diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2009-09-15 21:13:48 -0700 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-09-17 10:06:37 +1000 |
commit | e2c64551808988657069006f74c6780973ec0557 (patch) | |
tree | a00b876f259518ffb98de17172d50a7fdbecf988 /hw/xfree86/common/xf86Config.c | |
parent | 3bdf36476179257561b9409c3f49a77640fbb9f9 (diff) |
Add configuration option for use of SIGIO handlers for input events
Boolean option to enable/disable SIGIO handlers is set by the first
of these found:
- UseSIGIO option is set in xorg.conf ServerFlags
- Default set at build time by ./configure --enable-use-sigio-by-default
- Platform default value: Solaris = no, all others = yes
This matches the current settings on all platforms except Solaris.
This reverts Solaris (for now) to the settings used in Xorg 1.6, before
SIGIO support for Solaris was added, due to some system level bugs that
won't be resolved in time for Xorg 1.7 release, but allows us to enable
when those are resolved (or when we need to test if they're resolved).
See http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6879897
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'hw/xfree86/common/xf86Config.c')
-rw-r--r-- | hw/xfree86/common/xf86Config.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 82c39939e..0605f37e0 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -708,6 +708,7 @@ typedef enum { FLAG_AUTO_ENABLE_DEVICES, FLAG_GLX_VISUALS, FLAG_DRI2, + FLAG_USE_SIGIO } FlagValues; static OptionInfoRec FlagOptions[] = { @@ -765,6 +766,8 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE }, { FLAG_DRI2, "DRI2", OPTV_BOOLEAN, {0}, FALSE }, + { FLAG_USE_SIGIO, "UseSIGIO", OPTV_BOOLEAN, + {0}, USE_SIGIO_BY_DEFAULT }, { -1, NULL, OPTV_NONE, {0}, FALSE }, }; @@ -832,6 +835,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86Msg(X_CONFIG, "Ignoring ABI Version\n"); } + if (xf86SIGIOSupported()) { + xf86GetOptValBool(FlagOptions, FLAG_USE_SIGIO, &xf86Info.useSIGIO); + if (xf86IsOptionSet(FlagOptions, FLAG_USE_SIGIO)) { + from = X_CONFIG; + } else { + from = X_DEFAULT; + } + if (!xf86Info.useSIGIO) { + xf86Msg(from, "Disabling SIGIO handlers for input devices\n"); + } else if (from == X_CONFIG) { + xf86Msg(from, "Enabling SIGIO handlers for input devices\n"); + } + } else { + xf86Info.useSIGIO = FALSE; + } + if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_DEVICES)) { xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_DEVICES, &xf86Info.autoAddDevices); |