screen: signal workspace creation from client applications
Using an external application using libwnck an external application can create a new workspace by moving a window into it. In this case we are currently missing a "workspace-added" signal emission. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com> https://bugzilla.gnome.org/show_bug.cgi?id=666015
This commit is contained in:
parent
e4ed433e18
commit
d64c5bfc11
@ -1554,7 +1554,7 @@ static void
|
|||||||
update_num_workspaces (MetaScreen *screen,
|
update_num_workspaces (MetaScreen *screen,
|
||||||
guint32 timestamp)
|
guint32 timestamp)
|
||||||
{
|
{
|
||||||
int new_num;
|
int new_num, old_num;
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
int i;
|
int i;
|
||||||
GList *extras;
|
GList *extras;
|
||||||
@ -1584,6 +1584,7 @@ update_num_workspaces (MetaScreen *screen,
|
|||||||
++i;
|
++i;
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
old_num = i;
|
||||||
|
|
||||||
g_assert (last_remaining);
|
g_assert (last_remaining);
|
||||||
|
|
||||||
@ -1618,22 +1619,22 @@ update_num_workspaces (MetaScreen *screen,
|
|||||||
|
|
||||||
g_assert (w->windows == NULL);
|
g_assert (w->windows == NULL);
|
||||||
meta_workspace_remove (w);
|
meta_workspace_remove (w);
|
||||||
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_list_free (extras);
|
g_list_free (extras);
|
||||||
|
|
||||||
while (i < new_num)
|
for (i = old_num; i < new_num; i++)
|
||||||
{
|
meta_workspace_new (screen);
|
||||||
meta_workspace_new (screen);
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
|
|
||||||
set_number_of_spaces_hint (screen, new_num);
|
set_number_of_spaces_hint (screen, new_num);
|
||||||
|
|
||||||
meta_screen_queue_workarea_recalc (screen);
|
meta_screen_queue_workarea_recalc (screen);
|
||||||
|
|
||||||
|
for (i = old_num; i < new_num; i++)
|
||||||
|
g_signal_emit (screen, screen_signals[WORKSPACE_ADDED], 0, i);
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (screen), "n-workspaces");
|
g_object_notify (G_OBJECT (screen), "n-workspaces");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user