<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2014-03-28 15:41 GMT-03:00 Laércio de Sousa <span dir="ltr"><<a href="mailto:lbsousajr@gmail.com" target="_blank">lbsousajr@gmail.com</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>You'll need to take care with ServerLayout section. I've detected a small problem with your patch in a very particular situation:</div>

<div><br></div><div>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:</div>
<div><br></div><div>Section "Device"</div><div>    Identifier "device0"</div><div>    (...)</div><div>    MatchSeat "seat1"</div><div>EndSection</div><div><br></div><div><div>Section "Screen"</div>


<div>    Identifier "screen0"</div><div>    Device "device0"</div><div>    (...)</div><div>    MatchSeat "seat1"</div><div>EndSection</div></div><div><br></div><div><div>Section "ServerLayout"</div>


<div>    Identifier "layout0"</div><div>    Screen "screen0"</div><div>    (...)</div><div>    MatchSeat "seat1"</div><div>EndSection</div></div><div><br></div><div>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.</div>

</blockquote></div><br>I've made a small change in your patch that seems to solve this problem: just moved the</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">+    XF86ConfLayoutPtr layout;</div>

<div class="gmail_extra">+</div><div class="gmail_extra">+    FIND_SUITABLE(XF86ConfLayoutPtr, xf86configptr->conf_layout_lst, layout);</div><div class="gmail_extra"><br></div><div class="gmail_extra">part outside the if-clause. The changed hunk looks like this:</div>

</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">@@ -2429,14 +2443,19 @@ xf86HandleConfigFile(Bool autoconfig)</div><div class="gmail_extra">      */</div><div class="gmail_extra">

<br></div><div class="gmail_extra">     /* First check if a layout section is present, and if it is valid. */</div><div class="gmail_extra">+    XF86ConfLayoutPtr layout;</div><div class="gmail_extra">+</div><div class="gmail_extra">

+    FIND_SUITABLE(XF86ConfLayoutPtr, xf86configptr->conf_layout_lst, layout);</div><div class="gmail_extra">+    if (layout == NULL || xf86ScreenName != NULL) {</div><div class="gmail_extra">+        XF86ConfScreenPtr screen;</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">-    if (xf86configptr->conf_layout_lst == NULL || xf86ScreenName != NULL) {</div><div class="gmail_extra">         if (xf86ScreenName == NULL) {</div><div class="gmail_extra">

             xf86Msg(X_DEFAULT,</div><div class="gmail_extra">                     "No Layout section.  Using the first Screen section.\n");</div><div class="gmail_extra">         }</div><div class="gmail_extra">

+        FIND_SUITABLE (XF86ConfScreenPtr, xf86configptr->conf_screen_lst, screen);</div><div class="gmail_extra">         if (!configImpliedLayout(&xf86ConfigLayout,</div><div class="gmail_extra">-                                 xf86configptr->conf_screen_lst,</div>

<div class="gmail_extra">+                                 screen,</div><div class="gmail_extra">                                  xf86configptr)) {</div><div class="gmail_extra">                                         xf86Msg(X_ERROR, "Unable to determine the screen layout\n");</div>

<div class="gmail_extra">             return CONFIG_PARSE_ERROR;</div><br clear="all"><div><div dir="ltr">CANTATE DOMINO CANTICUM NOVUM<div>QUIA MIRABILIA FECIT</div><div><br></div><div>Laércio</div></div></div>
</div></div>