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:
Lionel Landwerlin 2011-12-06 15:41:27 +00:00 committed by Owen W. Taylor
parent e4ed433e18
commit d64c5bfc11

View File

@ -1554,7 +1554,7 @@ static void
update_num_workspaces (MetaScreen *screen,
guint32 timestamp)
{
int new_num;
int new_num, old_num;
GList *tmp;
int i;
GList *extras;
@ -1584,6 +1584,7 @@ update_num_workspaces (MetaScreen *screen,
++i;
tmp = tmp->next;
}
old_num = i;
g_assert (last_remaining);
@ -1624,16 +1625,16 @@ update_num_workspaces (MetaScreen *screen,
g_list_free (extras);
while (i < new_num)
{
for (i = old_num; i < new_num; i++)
meta_workspace_new (screen);
++i;
}
set_number_of_spaces_hint (screen, new_num);
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");
}