Commit 481fbfd9 authored by Jan Ziak's avatar Jan Ziak 💬 Committed by Andre Miranda
Browse files

Avoid redundant calls to backdrop_changed_cb (Bug #16773)



Signed-off-by: Jan Ziak's avatarJan Ziak <0xe2.0x9a.0x9b@gmail.com>
parent 4cddee73
......@@ -102,6 +102,7 @@ struct _XfceDesktopPrivate
gint nworkspaces;
XfceWorkspace **workspaces;
gint current_workspace;
gboolean current_workspace_initialized;
gboolean single_workspace_mode;
gint single_workspace_num;
......@@ -745,10 +746,13 @@ workspace_changed_cb(WnckScreen *wnck_screen,
current_workspace = desktop->priv->current_workspace;
new_workspace = xfce_desktop_get_current_workspace(desktop);
if(desktop->priv->current_workspace_initialized && new_workspace == current_workspace)
return;
if(new_workspace < 0 || new_workspace >= desktop->priv->nworkspaces)
return;
desktop->priv->current_workspace = new_workspace;
desktop->priv->current_workspace_initialized = TRUE;
XF_DEBUG("current_workspace %d, new_workspace %d",
current_workspace, new_workspace);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment