[gtk+] wayland: Add more debug output



commit da16947e21225f0fd575279afaf5ba6ae482dd49
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Apr 9 00:13:37 2015 -0400

    wayland: Add more debug output

 gdk/wayland/gdkscreen-wayland.c |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c
index 122fafa..a274087 100644
--- a/gdk/wayland/gdkscreen-wayland.c
+++ b/gdk/wayland/gdkscreen-wayland.c
@@ -1036,6 +1036,10 @@ output_handle_geometry (void             *data,
 {
   GdkWaylandMonitor *monitor = (GdkWaylandMonitor *)data;
 
+  GDK_NOTE (MISC,
+            g_message ("handle geometry output %d, position %d %d, phys. size %d %d, manufacturer %s, model 
%s",
+                       monitor->id, x, y, physical_width, physical_height, make, model));
+
   monitor->geometry.x = x;
   monitor->geometry.y = y;
 
@@ -1058,6 +1062,9 @@ output_handle_done (void             *data,
 {
   GdkWaylandMonitor *monitor = (GdkWaylandMonitor *)data;
 
+  GDK_NOTE (MISC,
+            g_message ("handle done output %d", monitor->id));
+
   g_signal_emit_by_name (monitor->screen, "monitors-changed");
   update_screen_size (monitor->screen);
 }
@@ -1065,12 +1072,17 @@ output_handle_done (void             *data,
 static void
 output_handle_scale (void             *data,
                      struct wl_output *wl_output,
-                     int32_t           factor)
+                     int32_t           scale)
 {
   GdkWaylandMonitor *monitor = (GdkWaylandMonitor *)data;
 
-  monitor->scale = factor;
-  g_signal_emit_by_name (monitor->screen, "monitors-changed");
+  GDK_NOTE (MISC,
+            g_message ("handle scale output %d, scale %d", monitor->id, scale));
+
+  monitor->scale = scale;
+
+  if (monitor->geometry.width != 0 && monitor->version < OUTPUT_VERSION_WITH_DONE)
+    g_signal_emit_by_name (monitor->screen, "monitors-changed");
 }
 
 static void
@@ -1083,6 +1095,10 @@ output_handle_mode (void             *data,
 {
   GdkWaylandMonitor *monitor = (GdkWaylandMonitor *)data;
 
+  GDK_NOTE (MISC,
+            g_message ("handle mode output %d, size %d %d, rate %d",
+                       monitor->id, width, height, refresh));
+
   if ((flags & WL_OUTPUT_MODE_CURRENT) == 0)
     return;
 


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