summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2013-07-02 14:50:21 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2013-07-03 15:29:21 +0100
commit2bc005f39e018a2f9d0a5268c2e031897dfecfe1 (patch)
tree1ba27b0aa2638ed408c8b24fb7f5042af5a3c3e0
parent66a2e3e5e51ce936970de5f2cef1e32dd3144386 (diff)
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.
-rw-r--r--src/wndproc.c8
1 files changed, 8 insertions, 0 deletions
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;