[mutter] Add MetaScreen::monitors-changed signal
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Add MetaScreen::monitors-changed signal
- Date: Wed, 16 Mar 2011 13:37:14 +0000 (UTC)
commit 0ff602be0663662ef73471c763ef9dbde3b8c704
Author: Alexander Larsson <alexl redhat com>
Date: Fri Feb 25 11:25:37 2011 +0100
Add MetaScreen::monitors-changed signal
https://bugzilla.gnome.org/show_bug.cgi?id=609258
src/core/screen-private.h | 1 +
src/core/screen.c | 12 ++++++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/core/screen-private.h b/src/core/screen-private.h
index 8a2dea7..1d98a18 100644
--- a/src/core/screen-private.h
+++ b/src/core/screen-private.h
@@ -141,6 +141,7 @@ struct _MetaScreenClass
void (*restacked) (MetaScreen *);
void (*workareas_changed) (MetaScreen *);
+ void (*monitors_changed) (MetaScreen *);
};
MetaScreen* meta_screen_new (MetaDisplay *display,
diff --git a/src/core/screen.c b/src/core/screen.c
index 2f42ac2..b6abbe3 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]