[gtk+] wayland: Set screen size to bounding box of all outputs



commit abe7dc6bb42a80b653b87b5bc051bbb78859ec76
Author: Kristian Høgsberg <krh bitplanet net>
Date:   Tue Mar 26 17:23:31 2013 -0400

    wayland: Set screen size to bounding box of all outputs
    
    Don't hardcode 8192x8192.  We don't get this info from wayland, so we
    compute it as we receive information about the available wl_outputs.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692871

 gdk/wayland/gdkscreen-wayland.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c
index be1a0f5..5d17688 100644
--- a/gdk/wayland/gdkscreen-wayland.c
+++ b/gdk/wayland/gdkscreen-wayland.c
@@ -789,8 +789,8 @@ _gdk_wayland_screen_new (GdkDisplay *display)
 
   screen_wayland = GDK_WAYLAND_SCREEN (screen);
   screen_wayland->display = display;
-  screen_wayland->width = 8192;
-  screen_wayland->height = 8192;
+  screen_wayland->width = 0;
+  screen_wayland->height = 0;
 
   screen_wayland->visual = gdk_wayland_visual_new (screen);
 
@@ -891,6 +891,11 @@ output_handle_mode(void *data,
 
   monitor->geometry.width = width;
   monitor->geometry.height = height;
+
+  monitor->screen->width =
+    MAX (monitor->screen->width, monitor->geometry.x + width);
+  monitor->screen->height =
+    MAX (monitor->screen->height, monitor->geometry.y + height);
 }
 
 static const struct wl_output_listener output_listener =


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