[PATCH] config by seat
Laércio de Sousa
lbsousajr at gmail.com
Mon Mar 31 06:46:42 PDT 2014
2014-03-28 15:41 GMT-03:00 Laércio de Sousa <lbsousajr at gmail.com>:
> You'll need to take care with ServerLayout section. I've detected a small
> problem with your patch in a very particular situation:
>
> Consider a machine with two seats, seat0 and seat1. Suppose you only have
> a file /etc/X11/xorg.conf.d/90-seat.conf with the following structure:
>
> Section "Device"
> Identifier "device0"
> (...)
> MatchSeat "seat1"
> EndSection
>
> Section "Screen"
> Identifier "screen0"
> Device "device0"
> (...)
> MatchSeat "seat1"
> EndSection
>
> Section "ServerLayout"
> Identifier "layout0"
> Screen "screen0"
> (...)
> MatchSeat "seat1"
> EndSection
>
> In this situation, the seat0 X server will fail to find the default layout
> and will crash. If you remove the ServerLayout section from file, this
> problem disappears.
>
I've made a small change in your patch that seems to solve this problem:
just moved the
+ XF86ConfLayoutPtr layout;
+
+ FIND_SUITABLE(XF86ConfLayoutPtr, xf86configptr->conf_layout_lst,
layout);
part outside the if-clause. The changed hunk looks like this:
@@ -2429,14 +2443,19 @@ xf86HandleConfigFile(Bool autoconfig)
*/
/* First check if a layout section is present, and if it is valid. */
+ XF86ConfLayoutPtr layout;
+
+ FIND_SUITABLE(XF86ConfLayoutPtr, xf86configptr->conf_layout_lst,
layout);
+ if (layout == NULL || xf86ScreenName != NULL) {
+ XF86ConfScreenPtr screen;
- if (xf86configptr->conf_layout_lst == NULL || xf86ScreenName != NULL) {
if (xf86ScreenName == NULL) {
xf86Msg(X_DEFAULT,
"No Layout section. Using the first Screen
section.\n");
}
+ FIND_SUITABLE (XF86ConfScreenPtr, xf86configptr->conf_screen_lst,
screen);
if (!configImpliedLayout(&xf86ConfigLayout,
- xf86configptr->conf_screen_lst,
+ screen,
xf86configptr)) {
xf86Msg(X_ERROR, "Unable to
determine the screen layout\n");
return CONFIG_PARSE_ERROR;
CANTATE DOMINO CANTICUM NOVUM
QUIA MIRABILIA FECIT
Laércio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140331/025c848b/attachment-0001.html>
More information about the xorg-devel
mailing list