mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-15 00:13:28 +00:00
xfree86: AllowEmptyInput is now enabled by default if hotplugging is enabled.
Remove AEI check from configImpliedLayout as the setting isn't actually parsed at this point anyway (written by Sasha Hlusiak). Resurrect checkInput() and check for devices there if AEI is false (this also creates the default devices if required). Set AllowEmptyInput to enabled by default if hotplugging is enabled.
This commit is contained in:
parent
fe5cf7cb00
commit
e317943c12
2 changed files with 14 additions and 7 deletions
|
|
@ -1087,9 +1087,9 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
|||
}
|
||||
#endif
|
||||
|
||||
xf86Info.allowEmptyInput = FALSE;
|
||||
if (xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &value))
|
||||
xf86Info.allowEmptyInput = TRUE;
|
||||
/* AllowEmptyInput is automatically true if we're hotplugging */
|
||||
xf86Info.allowEmptyInput = (xf86Info.autoAddDevices && xf86Info.autoEnableDevices);
|
||||
xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &xf86Info.allowEmptyInput);
|
||||
|
||||
xf86Info.useDefaultFontPath = TRUE;
|
||||
xf86Info.useDefaultFontPathFrom = X_DEFAULT;
|
||||
|
|
@ -1874,9 +1874,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen)
|
|||
indp = xnfalloc(sizeof(IDevPtr));
|
||||
*indp = NULL;
|
||||
servlayoutp->inputs = indp;
|
||||
if (!xf86Info.allowEmptyInput && !checkCoreInputDevices(servlayoutp, TRUE))
|
||||
return FALSE;
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -2479,6 +2477,12 @@ addDefaultModes(MonPtr monitorp)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
checkInput(serverLayoutPtr layout) {
|
||||
if (!xf86Info.allowEmptyInput)
|
||||
checkCoreInputDevices(layout, FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* load the config file and fill the global data structure
|
||||
*/
|
||||
|
|
@ -2599,6 +2603,8 @@ xf86HandleConfigFile(Bool autoconfig)
|
|||
configDRI(xf86configptr->conf_dri);
|
||||
#endif
|
||||
|
||||
checkInput(&xf86ConfigLayout);
|
||||
|
||||
/*
|
||||
* Handle some command line options that can override some of the
|
||||
* ServerFlags settings.
|
||||
|
|
|
|||
Loading…
Reference in a new issue