[PATCH 05/12] Xming: Prevent the mouse wheel from stalling when another window is minimized.

Jon TURNEY jon.turney at dronecode.org.uk
Wed May 20 04:52:23 PDT 2009


From: Colin Harrison <colin.harrison at virgin.net>

Fix internal WM to prevent the mouse wheel from stalling when another window is minimized.

Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 hw/xwin/winmultiwindowwndproc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/hw/xwin/winmultiwindowwndproc.c b/hw/xwin/winmultiwindowwndproc.c
index 5b50997..5477bd7 100644
--- a/hw/xwin/winmultiwindowwndproc.c
+++ b/hw/xwin/winmultiwindowwndproc.c
@@ -786,6 +786,10 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
 	    if (!pWin || !pWin->overrideRedirect) /* for OOo menus */
 	      winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg);
 	}
+      /* Prevent the mouse wheel from stalling when another window is minimized */
+      if (HIWORD(wParam) == 0 && LOWORD(wParam) == WA_ACTIVE &&
+	  (HWND)lParam != NULL && (HWND)lParam != (HWND)GetParent(hwnd))
+	SetFocus(hwnd);
       return 0;
 
     case WM_ACTIVATEAPP:
-- 
1.6.1.2



More information about the xorg-devel mailing list