Call all ewmh_update_* functions together when necessary
The testcase is changed because it was actually incorrect. Easy to verify because: > _NET_CURRENT_DESKTOP > … > The index of the current desktop. This is always an integer between 0 > and _NET_NUMBER_OF_DESKTOPS - 1. Fixes #3696. Also updates the viewports. Finally, fixes an issue with _NET_CURRENT_DESKTOP not being updated after a workspace rename. Example: - workspaces 1, 2, 3 - rename workspace 1 to 5 - All workspaces changed their index but _NET_CURRENT_DESKTOP was not updated
This commit is contained in:
@ -161,10 +161,7 @@ Con *workspace_get(const char *num, bool *created) {
|
||||
con_attach(workspace, content, false);
|
||||
|
||||
ipc_send_workspace_event("init", workspace, NULL);
|
||||
ewmh_update_number_of_desktops();
|
||||
ewmh_update_desktop_names();
|
||||
ewmh_update_desktop_viewport();
|
||||
ewmh_update_wm_desktop();
|
||||
ewmh_update_desktop_properties();
|
||||
if (created != NULL)
|
||||
*created = true;
|
||||
} else if (created != NULL) {
|
||||
@ -520,10 +517,7 @@ void workspace_show(Con *workspace) {
|
||||
old_focus = NULL;
|
||||
}
|
||||
|
||||
ewmh_update_number_of_desktops();
|
||||
ewmh_update_desktop_names();
|
||||
ewmh_update_desktop_viewport();
|
||||
ewmh_update_wm_desktop();
|
||||
ewmh_update_desktop_properties();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user