handlers.c: new focus should not end up behind fullscreen

This was raised here:
https://www.reddit.com/r/i3wm/comments/df18aa/popup_during_fullscreen_not_behaving_the_way_i/

With this commit, _NET_ACTIVE_WINDOW requests are more similar to
focusing with cmd_focus.
This commit is contained in:
Orestis Floros
2019-10-09 02:32:22 +03:00
parent 34c217acc8
commit 6f82d21c39
2 changed files with 20 additions and 11 deletions

View File

@ -149,6 +149,22 @@ send_net_active_window($scratch->id, 'pager');
is($x->input_focus, $scratch->id, 'scratchpad window is shown');
################################################################################
# Send a _NET_ACTIVE_WINDOW ClientMessage for a window behind a fullscreen
# window
################################################################################
$ws1 = fresh_workspace;
$win1 = open_window;
$win2 = open_window;
cmd 'fullscreen enable';
is_num_fullscreen($ws1, 1, '1 fullscreen window in workspace');
send_net_active_window($win1->id);
is($x->input_focus, $win1->id, 'window behind fullscreen window is now focused');
is_num_fullscreen($ws1, 0, 'no fullscreen windows in workspace');
################################################################################
# Verify that the _NET_ACTIVE_WINDOW property is updated on the root window
# correctly.