diff options
author | marha <marha@users.sourceforge.net> | 2012-01-28 13:55:41 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-01-28 13:55:41 +0100 |
commit | 1aee8dafb5391e093f3a111f906ab0d8b6775510 (patch) | |
tree | 3fd4cc1783510fb6ce17c4c42b4d012014008e5b /xorg-server/hw/xwin/InitOutput.c | |
parent | c6a1477b0092762299491d79b3a8cb094c6456da (diff) | |
download | vcxsrv-1aee8dafb5391e093f3a111f906ab0d8b6775510.tar.gz vcxsrv-1aee8dafb5391e093f3a111f906ab0d8b6775510.tar.bz2 vcxsrv-1aee8dafb5391e093f3a111f906ab0d8b6775510.zip |
mesa xserver git update 28 jan 2012
Diffstat (limited to 'xorg-server/hw/xwin/InitOutput.c')
-rw-r--r-- | xorg-server/hw/xwin/InitOutput.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c index 770439258..4a601b222 100644 --- a/xorg-server/hw/xwin/InitOutput.c +++ b/xorg-server/hw/xwin/InitOutput.c @@ -673,8 +673,35 @@ OsVendorInit (void) /* We have to flag this as an explicit screen, even though it isn't */ g_ScreenInfo[0].fExplicitScreen = TRUE; } -} + /* Work out what the default emulate3buttons setting should be, and apply + it if nothing was explicitly specified */ + { + int mouseButtons = GetSystemMetrics(SM_CMOUSEBUTTONS); + int j; + + for (j = 0; j < g_iNumScreens; j++) + { + if (g_ScreenInfo[j].iE3BTimeout == WIN_E3B_DEFAULT) + { + if (mouseButtons < 3) + { + static Bool reportOnce = TRUE; + g_ScreenInfo[j].iE3BTimeout = WIN_DEFAULT_E3B_TIME; + if (reportOnce) + { + reportOnce = FALSE; + winMsg(X_PROBED, "Windows reports only %d mouse buttons, defaulting to -emulate3buttons\n", mouseButtons); + } + } + else + { + g_ScreenInfo[j].iE3BTimeout = WIN_E3B_OFF; + } + } + } + } +} static void winUseMsg (void) @@ -706,7 +733,7 @@ winUseMsg (void) "\tSpecify an optional bitdepth to use in fullscreen mode\n" "\twith a DirectDraw engine.\n"); - ErrorF ("-emulate3buttons [timeout]\n" + ErrorF ("-[no]emulate3buttons [timeout]\n" "\tEmulate 3 button mouse with an optional timeout in\n" "\tmilliseconds.\n"); |