diff options
author | Ingo Bürk <admin@airblader.de> | 2020-04-10 14:00:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-10 14:00:26 +0200 |
commit | 312d3dfbd35d1c8a02756f077e58b20021c11a3a (patch) | |
tree | 6a2958a3f4c6d9c9c5d9700783dee6e6734583bd | |
parent | 1e6b510497d178c6dc2b73722d06110f14c461c9 (diff) | |
parent | ed67eaca2c310a34754dec5310a989e22df992fd (diff) | |
download | i3-312d3dfbd35d1c8a02756f077e58b20021c11a3a.tar.gz i3-312d3dfbd35d1c8a02756f077e58b20021c11a3a.zip |
Merge pull request #4003 from orestisfl/update_desktop_properties_on_move
Update EWMH properties on workspace move
-rw-r--r-- | src/workspace.c | 2 | ||||
-rw-r--r-- | testcases/t/521-ewmh-desktop-viewport.t | 33 |
2 files changed, 34 insertions, 1 deletions
diff --git a/src/workspace.c b/src/workspace.c index b98750ff..f48599c7 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -1049,6 +1049,8 @@ void workspace_move_to_output(Con *ws, Output *output) { workspace_show(ws); } + ewmh_update_desktop_properties(); + if (!previously_visible_ws) { return; } diff --git a/testcases/t/521-ewmh-desktop-viewport.t b/testcases/t/521-ewmh-desktop-viewport.t index 5ede140d..a4119367 100644 --- a/testcases/t/521-ewmh-desktop-viewport.t +++ b/testcases/t/521-ewmh-desktop-viewport.t @@ -50,7 +50,10 @@ sub get_desktop_viewport { return unpack ("L$len", $reply->{value}); } -# initialize the workspaces +################################################################################ +# Initialize the workspaces +################################################################################ + cmd 'workspace 1'; cmd 'workspace 0'; @@ -60,6 +63,10 @@ my @desktop_viewport = get_desktop_viewport; is_deeply(\@desktop_viewport, \@expected_viewport, '_NET_DESKTOP_VIEWPORT should be an array of x/y coordinate pairs for the upper left corner of the respective outputs of the workspaces'); +################################################################################ +# Create workspace +################################################################################ + cmd 'workspace 0'; open_window; cmd 'workspace 3'; @@ -70,6 +77,10 @@ cmd 'workspace 3'; is_deeply(\@desktop_viewport, \@expected_viewport, 'it should be updated when a new workspace appears'); +################################################################################ +# Rename workspace +################################################################################ + cmd 'rename workspace 3 to 2'; @expected_viewport = (0, 0, 0, 0, 1024, 0); @@ -78,6 +89,10 @@ cmd 'rename workspace 3 to 2'; is_deeply(\@desktop_viewport, \@expected_viewport, 'it should stay up to date when a workspace is renamed'); +################################################################################ +# Empty workspace +################################################################################ + cmd 'workspace 0'; @expected_viewport = (0, 0, 1024, 0); @@ -86,4 +101,20 @@ cmd 'workspace 0'; is_deeply(\@desktop_viewport, \@expected_viewport, 'it should be updated when a workspace is emptied'); +################################################################################ +# Move workspace +# See #4001 +################################################################################ + +# Keep workspace 1 open to have 3 workspaces in total +cmd 'workspace 1'; +open_window; +cmd 'workspace 0, move workspace to output right'; +@expected_viewport = (0, 0, 1024, 0, 1024, 0); +@desktop_viewport = get_desktop_viewport; +is_deeply(\@desktop_viewport, \@expected_viewport, + 'it should be updated when a workspace is moved'); + +################################################################################ + done_testing; |