Add MetaScreen::monitors-changed signal
https://bugzilla.gnome.org/show_bug.cgi?id=609258
This commit is contained in:
parent
7246d0ede2
commit
0ff602be06
@ -141,6 +141,7 @@ struct _MetaScreenClass
|
||||
|
||||
void (*restacked) (MetaScreen *);
|
||||
void (*workareas_changed) (MetaScreen *);
|
||||
void (*monitors_changed) (MetaScreen *);
|
||||
};
|
||||
|
||||
MetaScreen* meta_screen_new (MetaDisplay *display,
|
||||
|
@ -86,6 +86,7 @@ enum
|
||||
WORKSPACE_SWITCHED,
|
||||
STARTUP_SEQUENCE_CHANGED,
|
||||
WORKAREAS_CHANGED,
|
||||
MONITORS_CHANGED,
|
||||
|
||||
LAST_SIGNAL
|
||||
};
|
||||
@ -227,6 +228,15 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
screen_signals[MONITORS_CHANGED] =
|
||||
g_signal_new ("monitors-changed",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaScreenClass, monitors_changed),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_N_WORKSPACES,
|
||||
pspec);
|
||||
@ -2791,6 +2801,8 @@ meta_screen_resize (MetaScreen *screen,
|
||||
|
||||
/* Queue a resize on all the windows */
|
||||
meta_screen_foreach_window (screen, meta_screen_resize_func, 0);
|
||||
|
||||
g_signal_emit (screen, screen_signals[MONITORS_CHANGED], 0, index);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user