Fix handling of new windows with WM_STATE_FULLSCREEN

If the currently focused window is in fullscreen mode, and a new window
is opened with WM_STATE_FULLSCREEN set, the new window now becomes the
new fullscreen window and gains focus.
This commit is contained in:
jj
2013-09-18 20:06:48 +02:00
committed by Michael Stapelberg
parent 3ba8642efd
commit ee04f8bfda
2 changed files with 30 additions and 6 deletions

View File

@ -214,4 +214,25 @@ sync_with_i3;
# Verify that $swindow was the one that initially remained fullscreen.
is(fullscreen_windows($tmp), 0, 'no fullscreen windows on first ws');
################################################################################
# Verify that opening a window with _NET_WM_STATE_FULLSCREEN unfullscreens any
# existing container on the workspace and fullscreens the newly opened window.
################################################################################
$tmp = fresh_workspace;
$window = open_window();
cmd "fullscreen";
is(fullscreen_windows($tmp), 1, 'one fullscreen window on ws');
is($x->input_focus, $window->id, 'fullscreen window focused');
$swindow = open_window({
fullscreen => 1
});
is(fullscreen_windows($tmp), 1, 'one fullscreen window on ws');
is($x->input_focus, $swindow->id, 'fullscreen window focused');
done_testing;