summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2012-01-29 12:38:49 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2012-01-29 12:38:49 +0000
commit45e67e363e19a481cb8001574d0238ad42e10e60 (patch)
treef6f521d467e10b9baa013dcd6e79ba143beddf2a
parenta20912c5cc6bd48c359f4780c1c4160c1e8cdab3 (diff)
parent207b6835b70bdd11883298ae6523d66ee812cdf0 (diff)
Merge branch 'cygwin-patches-for-1.11' into cygwin-release-1.11xserver-cygwin-1.11.4-1
Conflicts: hw/xwin/winmultiwindowwindow.c
-rw-r--r--hw/xwin/InitOutput.c5
-rw-r--r--hw/xwin/man/XWin.man12
-rw-r--r--hw/xwin/winglobals.c2
-rw-r--r--hw/xwin/winkeybd.c23
-rw-r--r--hw/xwin/winmultiwindowwndproc.c7
-rw-r--r--hw/xwin/winprocarg.c8
-rw-r--r--hw/xwin/winrandr.c2
-rw-r--r--hw/xwin/winwndproc.c10
8 files changed, 55 insertions, 14 deletions
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c
index 7989b2831..edf6a3a15 100644
--- a/hw/xwin/InitOutput.c
+++ b/hw/xwin/InitOutput.c
@@ -897,7 +897,7 @@ winUseMsg (void)
ErrorF ("-resize=none|scrollbars|randr"
"\tIn windowed mode, [don't] allow resizing of the window. 'scrollbars'\n"
"\tmode gives the window scrollbars as needed, 'randr' mode uses the RANR\n"
- "\textension to resize the X screen.\n");
+ "\textension to resize the X screen. 'randr' is the default.\n");
ErrorF ("-rootless\n"
"\tRun the server in rootless mode.\n");
@@ -931,7 +931,8 @@ winUseMsg (void)
#ifdef XWIN_GLX_WINDOWS
ErrorF ("-[no]wgl\n"
- "\tEnable the GLX extension to use the native Windows WGL interface for accelerated OpenGL\n");
+ "\tEnable the GLX extension to use the native Windows WGL interface\n"
+ "\tfor hardware-accelerated OpenGL (AIGLX). Enabled by default.\n");
#endif
ErrorF ("-[no]winkill\n"
diff --git a/hw/xwin/man/XWin.man b/hw/xwin/man/XWin.man
index fdf7b60cf..67219e3f7 100644
--- a/hw/xwin/man/XWin.man
+++ b/hw/xwin/man/XWin.man
@@ -121,14 +121,16 @@ Alternative name for \fB\-resize=scrollbars\fP.
.SH OPTIONS CONTROLLING RESIZE BEHAVIOUR
.TP 8
.B \-resize[=none|scrollbars|randr]
-Select the resize mode of an X screen.
+Select the resize mode of an X screen. The default is randr.
.RS
.IP \fB\-resize=none\fP 8
-(default). The screen is not resizable.
+The screen is not resizable.
In windowed mode, if the window has decorations, a fixed frame is used.
+Alternative name is \fB\-noresize\fP.
+
.IP \fB\-resize=scrollbars\fP 8
The screen window is resizeable, but the screen is not resizable.
@@ -159,8 +161,8 @@ of the X screen using the RANDR extension is not permitted.
The maximum dimensions of the screen are the dimensions of the \fIWindows\fP virtual desktop.
-.IP \fB\--resize\fP 8
-on its own is equivalent to \fB\--resize=randr\fP
+.IP \fB\-resize\fP 8
+on its own is equivalent to \fB\-resize=randr\fP
.RE
.SH OPTIONS FOR MULTIWINDOW MODE
@@ -217,7 +219,7 @@ is disabled by default.
.TP 8
.B \-[no]wgl
Enable [disable] the GLX extension to use the native Windows WGL interface
-for hardware accelerated OpenGL (AIGLX). (Experimental)
+for hardware accelerated OpenGL (AIGLX). The default is enabled.
.TP 8
.B \-[no]winkill
Enable or disable the \fIAlt-F4\fP key combination as a signal to exit the
diff --git a/hw/xwin/winglobals.c b/hw/xwin/winglobals.c
index da8ea0b7d..71cb283f3 100644
--- a/hw/xwin/winglobals.c
+++ b/hw/xwin/winglobals.c
@@ -76,7 +76,7 @@ Bool g_fKeyboardHookLL = FALSE;
Bool g_fNoHelpMessageBox = FALSE;
Bool g_fSoftwareCursor = FALSE;
Bool g_fSilentDupError = FALSE;
-Bool g_fNativeGl = FALSE;
+Bool g_fNativeGl = TRUE;
Bool g_fHostInTitle = FALSE;
pthread_mutex_t g_pmTerminating = PTHREAD_MUTEX_INITIALIZER;
diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c
index 278342f72..f1add8912 100644
--- a/hw/xwin/winkeybd.c
+++ b/hw/xwin/winkeybd.c
@@ -283,6 +283,29 @@ winRestoreModeKeyStates (void)
* have a logical XOR operator, so we use a macro instead.
*/
+ {
+ /* consider modifer keys */
+
+ BOOL ctrl = (GetAsyncKeyState (VK_CONTROL) < 0);
+ BOOL shift = (GetAsyncKeyState (VK_SHIFT) < 0);
+ BOOL alt = (GetAsyncKeyState (VK_LMENU) < 0);
+ BOOL altgr = (GetAsyncKeyState (VK_RMENU) < 0);
+
+ if (ctrl && altgr) ctrl = FALSE;
+
+ if (WIN_XOR (internalKeyStates & ControlMask, ctrl))
+ winSendKeyEvent (KEY_LCtrl, ctrl);
+
+ if (WIN_XOR (internalKeyStates & ShiftMask, shift))
+ winSendKeyEvent (KEY_ShiftL, shift);
+
+ if (WIN_XOR (internalKeyStates & Mod1Mask, alt))
+ winSendKeyEvent (KEY_Alt, alt);
+
+ if (WIN_XOR (internalKeyStates & Mod5Mask, altgr))
+ winSendKeyEvent (KEY_AltLang, altgr);
+ }
+
/* Has the key state changed? */
dwKeyState = GetKeyState (VK_NUMLOCK) & 0x0001;
if (WIN_XOR (internalKeyStates & NumLockMask, dwKeyState))
diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index 22346a44b..ff4669338 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -714,9 +714,12 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
/* Remove our keyboard hook if it is installed */
winRemoveKeyboardHookLL ();
+
+ /* Revert the X focus as well, but only if the Windows focus is going to another window */
if (!wParam)
- /* Revert the X focus as well, but only if the Windows focus is going to another window */
- DeleteWindowFromAnyEvents(pWin, FALSE);
+ if (pWin)
+ DeleteWindowFromAnyEvents(pWin, FALSE);
+
return 0;
case WM_SYSDEADCHAR:
diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c
index cc1f1841b..1ccef6bec 100644
--- a/hw/xwin/winprocarg.c
+++ b/hw/xwin/winprocarg.c
@@ -140,7 +140,7 @@ winInitializeScreenDefaults(void)
#endif
defaultScreenInfo.fMultipleMonitors = FALSE;
defaultScreenInfo.fLessPointer = FALSE;
- defaultScreenInfo.iResizeMode = notAllowed;
+ defaultScreenInfo.iResizeMode = resizeWithRandr;
defaultScreenInfo.fNoTrayIcon = FALSE;
defaultScreenInfo.iE3BTimeout = WIN_E3B_DEFAULT;
defaultScreenInfo.fUseWinKillKey = WIN_DEFAULT_WIN_KILL;
@@ -1260,7 +1260,11 @@ winOS(void)
prodName = "Windows NT";
else if (osvi.dwMajorVersion == 6)
{
- if (osvi.dwMinorVersion == 1)
+ if (osvi.dwMinorVersion == 2)
+ {
+ prodName = "Windows 8";
+ }
+ else if (osvi.dwMinorVersion == 1)
{
if (osvi.wProductType == VER_NT_WORKSTATION)
prodName = "Windows 7";
diff --git a/hw/xwin/winrandr.c b/hw/xwin/winrandr.c
index c58119360..596c1ab9d 100644
--- a/hw/xwin/winrandr.c
+++ b/hw/xwin/winrandr.c
@@ -122,8 +122,6 @@ Bool
winRandRScreenSetSize (ScreenPtr pScreen,
CARD16 width,
CARD16 height,
- CARD16 pixWidth,
- CARD16 pixHeight,
CARD32 mmWidth,
CARD32 mmHeight)
{
diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c
index 28314d1f9..e99697de8 100644
--- a/hw/xwin/winwndproc.c
+++ b/hw/xwin/winwndproc.c
@@ -182,6 +182,10 @@ winWindowProc (HWND hwnd, UINT message,
"new height: %d new bpp: %d\n",
LOWORD (lParam), HIWORD (lParam), wParam);
+ /* 0 bpp has no defined meaning, ignore this message */
+ if (wParam == 0)
+ break;
+
/*
* Check for a disruptive change in depth.
* We can only display a message for a disruptive depth change,
@@ -434,6 +438,12 @@ winWindowProc (HWND hwnd, UINT message,
}
return 0;
+ case WM_SYSCOMMAND:
+ if (s_pScreenInfo->iResizeMode == resizeWithRandr &&
+ ((wParam & 0xfff0) == SC_MAXIMIZE || (wParam & 0xfff0) == SC_RESTORE))
+ PostMessage(hwnd, WM_EXITSIZEMOVE, 0, 0);
+ break;
+
case WM_ENTERSIZEMOVE:
ErrorF("winWindowProc - WM_ENTERSIZEMOVE\n");
break;