From 2bc005f39e018a2f9d0a5268c2e031897dfecfe1 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Tue, 2 Jul 2013 14:50:21 +0100 Subject: Move Windows activated window to top of X window stack In WM_ACTIVATE, move the activated window to the top of the X window stack, so it is above all others in the X window stack and thus can properly receive mouse events over it. Really should synchronize changes in stacking order both ways. --- src/wndproc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wndproc.c b/src/wndproc.c index ec68b04..bb155b1 100644 --- a/src/wndproc.c +++ b/src/wndproc.c @@ -1019,6 +1019,14 @@ winTopLevelWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) /* If we are being activated, acquire the input focus */ if (LOWORD(wParam) != WA_INACTIVE) { + /* + XXX: we also move the activated window to the top of the X window stack, + so it is above all others in the X window stack and thus can properly + receive mouse events over it. This is a shortcut for synchronizing the + X and native window stacking. + */ + xcwm_window_set_to_top(window); + xcwm_window_set_input_focus(window); } return 0; -- cgit v1.2.3