]> git.sur5r.net Git - i3/i3/commitdiff
Merge branch 'master' into next
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 21 Dec 2013 20:32:55 +0000 (21:32 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 21 Dec 2013 20:32:55 +0000 (21:32 +0100)
src/handlers.c
testcases/t/195-net-active-window.t

index 72ef291cf96d60c30ba7e9a0f0fb92a060317606..fce6627659487199dfe66f1286c4e3da406d6686 100644 (file)
@@ -682,6 +682,11 @@ static void handle_client_message(xcb_client_message_event_t *event) {
             return;
         }
 
+        if (con_is_internal(ws)) {
+            DLOG("Workspace is internal, ignoring _NET_ACTIVE_WINDOW\n");
+            return;
+        }
+
         if (ws != con_get_workspace(focused))
             workspace_show(ws);
 
index c62d4fdad10454cf8c88e732027a406022450999..c3061c00961fec76f30a5e05baf7618d4b05ee57 100644 (file)
@@ -17,6 +17,7 @@
 # Verifies that the _NET_ACTIVE_WINDOW message only changes focus when the
 # window is on a visible workspace.
 # ticket #774, bug still present in commit 1e49f1b08a3035c1f238fcd6615e332216ab582e
+# ticket #1136, bug still present in commit fd07f989fdf441ef335245dd3436a70ff60e8896
 use i3test;
 
 sub send_net_active_window {
@@ -65,4 +66,21 @@ send_net_active_window($win1->id);
 
 is($x->input_focus, $win3->id, 'window 3 still has focus');
 
+################################################################################
+# Move a window to the scratchpad, send a _NET_ACTIVE_WINDOW for it and verify
+# that focus is still unchanged.
+################################################################################
+
+my $scratch = open_window;
+
+is($x->input_focus, $scratch->id, 'to-scratchpad window has focus');
+
+cmd 'move scratchpad';
+
+is($x->input_focus, $win3->id, 'focus reverted to window 3');
+
+send_net_active_window($scratch->id);
+
+is($x->input_focus, $win3->id, 'window 3 still focused');
+
 done_testing;