[MutterScreen] Added workareas-changed signal

This signal is emitted when workarea of any workspace belonging to the screen
changes.

https://bugzilla.gnome.org/show_bug.cgi?id=597009
This commit is contained in:
Tomas Frydrych 2009-09-17 09:49:23 +01:00
parent 948e54772d
commit 8589e4f3d3
2 changed files with 14 additions and 1 deletions

View File

@ -145,7 +145,8 @@ struct _MetaScreenClass
{
GObjectClass parent_class;
void (*restacked) (MetaScreen *);
void (*restacked) (MetaScreen *);
void (*workareas_changed) (MetaScreen *);
};
MetaScreen* meta_screen_new (MetaDisplay *display,

View File

@ -85,6 +85,7 @@ enum
WORKSPACE_REMOVED,
WORKSPACE_SWITCHED,
STARTUP_SEQUENCE_CHANGED,
WORKAREAS_CHANGED,
LAST_SIGNAL
};
@ -217,6 +218,15 @@ meta_screen_class_init (MetaScreenClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
screen_signals[WORKAREAS_CHANGED] =
g_signal_new ("workareas-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaScreenClass, workareas_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
g_object_class_install_property (object_class,
PROP_N_WORKSPACES,
pspec);
@ -2288,6 +2298,8 @@ set_work_area_hint (MetaScreen *screen)
(guchar*) data, num_workspaces*4);
g_free (data);
meta_error_trap_pop (screen->display, FALSE);
g_signal_emit (screen, screen_signals[WORKAREAS_CHANGED], 0);
}
static gboolean