Fix wallpaper flickering on workspace switch by mapping new clients before unmapping old clients
This commit is contained in:
parent
b904c9a34a
commit
8279eb3a4e
@ -175,17 +175,18 @@ void workspace_show(xcb_connection_t *conn, int workspace) {
|
|||||||
Workspace *old_workspace = c_ws;
|
Workspace *old_workspace = c_ws;
|
||||||
c_ws = t_ws->output->current_workspace = workspace_get(workspace-1);
|
c_ws = t_ws->output->current_workspace = workspace_get(workspace-1);
|
||||||
|
|
||||||
/* Unmap all clients of the old workspace */
|
|
||||||
workspace_unmap_clients(conn, old_workspace);
|
|
||||||
|
|
||||||
current_row = c_ws->current_row;
|
current_row = c_ws->current_row;
|
||||||
current_col = c_ws->current_col;
|
current_col = c_ws->current_col;
|
||||||
DLOG("new current row = %d, current col = %d\n", current_row, current_col);
|
DLOG("new current row = %d, current col = %d\n", current_row, current_col);
|
||||||
|
|
||||||
ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"focus\"}");
|
/* Map new clients before unmapping old clients to prevent wallpaper flickering */
|
||||||
|
|
||||||
workspace_map_clients(conn, c_ws);
|
workspace_map_clients(conn, c_ws);
|
||||||
|
|
||||||
|
/* Unmap all clients of the old workspace */
|
||||||
|
workspace_unmap_clients(conn, old_workspace);
|
||||||
|
|
||||||
|
ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"focus\"}");
|
||||||
|
|
||||||
/* POTENTIAL TO IMPROVE HERE: due to the call to _map_clients first and
|
/* POTENTIAL TO IMPROVE HERE: due to the call to _map_clients first and
|
||||||
* render_layout afterwards, there is a short flickering on the source
|
* render_layout afterwards, there is a short flickering on the source
|
||||||
* workspace (assign ws 3 to output 0, ws 4 to output 1, create single
|
* workspace (assign ws 3 to output 0, ws 4 to output 1, create single
|
||||||
|
Loading…
Reference in New Issue
Block a user