diff options
author | marha <marha@users.sourceforge.net> | 2014-05-18 14:38:14 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-05-18 14:38:14 +0200 |
commit | 55cf29d7f748b814a2b8eb016fbf15635d56aa53 (patch) | |
tree | 04d45a3c638e7397354fcd1df02d969c8ece058f /xorg-server/hw/xfree86/common/xf86Config.c | |
parent | ae06feae7876db47ff0e1fde40cf4a324a412037 (diff) | |
download | vcxsrv-55cf29d7f748b814a2b8eb016fbf15635d56aa53.tar.gz vcxsrv-55cf29d7f748b814a2b8eb016fbf15635d56aa53.tar.bz2 vcxsrv-55cf29d7f748b814a2b8eb016fbf15635d56aa53.zip |
plink fontconfig mesa xserver xkeyboard-config git update 18 May 2014
xserver commit 01e18af17f8dc91451fbd0902049045afd1cea7e
xkeyboard-config commit 2bf80b0d9b36fd56acf1f196fb781f045351efaf
fontconfig commit 58acd993cb13b58c61633174071ef42da3dcac85
mesa commit 5646319f25c7880b3706bb7590e24c84fd8de0fc
plink revision 10192
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Config.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Config.c | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c index 542d5abf6..2adef44c3 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.c +++ b/xorg-server/hw/xfree86/common/xf86Config.c @@ -232,6 +232,18 @@ xf86ValidateFontPath(char *path) return tmp_path; } +#define FIND_SUITABLE(pointertype, listhead, ptr) \ + do { \ + pointertype _l, _p; \ + \ + for (_l = (listhead), _p = NULL; !_p && _l; _l = (pointertype)_l->list.next) { \ + if (!_l->match_seat || (SeatId && xf86nameCompare(_l->match_seat, SeatId) == 0)) \ + _p = _l; \ + } \ + \ + (ptr) = _p; \ + } while(0) + /* * use the datastructure that the parser provides and pick out the parts * that we need at this point @@ -1580,8 +1592,11 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, * config file, or - if it is NULL - configScreen autogenerates one for * us */ if (!count) { + XF86ConfScreenPtr screen; + + FIND_SUITABLE (XF86ConfScreenPtr, xf86configptr->conf_screen_lst, screen); slp[0].screen = xnfcalloc(1, sizeof(confScreenRec)); - if (!configScreen(slp[0].screen, xf86configptr->conf_screen_lst, + if (!configScreen(slp[0].screen, screen, 0, X_CONFIG)) { free(slp[0].screen); free(slp); @@ -1821,7 +1836,7 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum, * set it to NULL so that the section can be autoconfigured later */ screenp->device = xnfcalloc(1, sizeof(GDevRec)); if ((!conf_screen->scrn_device) && (xf86configptr->conf_device_lst)) { - conf_screen->scrn_device = xf86configptr->conf_device_lst; + FIND_SUITABLE (XF86ConfDevicePtr, xf86configptr->conf_device_lst, conf_screen->scrn_device); xf86Msg(X_DEFAULT, "No device specified for screen \"%s\".\n" "\tUsing the first device section listed.\n", screenp->id); } @@ -2354,6 +2369,7 @@ xf86HandleConfigFile(Bool autoconfig) const char *scanptr; Bool singlecard = 0; Bool implicit_layout = FALSE; + XF86ConfLayoutPtr layout; if (!autoconfig) { char *filename, *dirname, *sysdirname; @@ -2429,14 +2445,17 @@ xf86HandleConfigFile(Bool autoconfig) */ /* First check if a layout section is present, and if it is valid. */ + 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; @@ -2451,16 +2470,13 @@ xf86HandleConfigFile(Bool autoconfig) if (optlist && xf86FindOption(optlist, "defaultserverlayout")) dfltlayout = xf86SetStrOption(optlist, "defaultserverlayout", NULL); - if (!configLayout - (&xf86ConfigLayout, xf86configptr->conf_layout_lst, - dfltlayout)) { + if (!configLayout(&xf86ConfigLayout, layout, dfltlayout)) { xf86Msg(X_ERROR, "Unable to determine the screen layout\n"); return CONFIG_PARSE_ERROR; } } else { - if (!configLayout(&xf86ConfigLayout, xf86configptr->conf_layout_lst, - NULL)) { + if (!configLayout(&xf86ConfigLayout, layout, NULL)) { xf86Msg(X_ERROR, "Unable to determine the screen layout\n"); return CONFIG_PARSE_ERROR; } |