Codebase list i3-gaps / 312d3df
Merge pull request #4003 from orestisfl/update_desktop_properties_on_move Update EWMH properties on workspace move Ingo Bürk authored 4 years ago GitHub committed 4 years ago
2 changed file(s) with 34 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
10481048 workspace_show(ws);
10491049 }
10501050
1051 ewmh_update_desktop_properties();
1052
10511053 if (!previously_visible_ws) {
10521054 return;
10531055 }
4949 return unpack ("L$len", $reply->{value});
5050 }
5151
52 # initialize the workspaces
52 ################################################################################
53 # Initialize the workspaces
54 ################################################################################
55
5356 cmd 'workspace 1';
5457 cmd 'workspace 0';
5558
5861
5962 is_deeply(\@desktop_viewport, \@expected_viewport,
6063 '_NET_DESKTOP_VIEWPORT should be an array of x/y coordinate pairs for the upper left corner of the respective outputs of the workspaces');
64
65 ################################################################################
66 # Create workspace
67 ################################################################################
6168
6269 cmd 'workspace 0';
6370 open_window;
6976 is_deeply(\@desktop_viewport, \@expected_viewport,
7077 'it should be updated when a new workspace appears');
7178
79 ################################################################################
80 # Rename workspace
81 ################################################################################
82
7283 cmd 'rename workspace 3 to 2';
7384
7485 @expected_viewport = (0, 0, 0, 0, 1024, 0);
7687
7788 is_deeply(\@desktop_viewport, \@expected_viewport,
7889 'it should stay up to date when a workspace is renamed');
90
91 ################################################################################
92 # Empty workspace
93 ################################################################################
7994
8095 cmd 'workspace 0';
8196
85100 is_deeply(\@desktop_viewport, \@expected_viewport,
86101 'it should be updated when a workspace is emptied');
87102
103 ################################################################################
104 # Move workspace
105 # See #4001
106 ################################################################################
107
108 # Keep workspace 1 open to have 3 workspaces in total
109 cmd 'workspace 1';
110 open_window;
111 cmd 'workspace 0, move workspace to output right';
112 @expected_viewport = (0, 0, 1024, 0, 1024, 0);
113 @desktop_viewport = get_desktop_viewport;
114 is_deeply(\@desktop_viewport, \@expected_viewport,
115 'it should be updated when a workspace is moved');
116
117 ################################################################################
118
88119 done_testing;