[gtk+] wayland: Emit monitors-changed when monitors change



commit 0489fcffbeb08aa8f30c24eb52ae09a459206b95
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Mar 26 21:37:21 2013 -0400

    wayland: Emit monitors-changed when monitors change

 gdk/wayland/gdkscreen-wayland.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c
index 1acc81a..6d5f317 100644
--- a/gdk/wayland/gdkscreen-wayland.c
+++ b/gdk/wayland/gdkscreen-wayland.c
@@ -876,6 +876,9 @@ output_handle_geometry(void *data,
    */
   if (display->init_ref_count > 0)
     display->init_ref_count--;
+
+  if (monitor->geometry.width != 0)
+    g_signal_emit_by_name (monitor->screen, "monitors-changed");
 }
 
 static void
@@ -894,6 +897,8 @@ output_handle_mode(void *data,
   monitor->geometry.width = width;
   monitor->geometry.height = height;
 
+  g_signal_emit_by_name (monitor->screen, "monitors-changed");
+
   monitor->screen->width =
     MAX (monitor->screen->width, monitor->geometry.x + width);
   monitor->screen->height =


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]