wayland: Stop using gdk_display_get_root_window
authorMatthias Clasen <mclasen@redhat.com>
Mon, 6 Nov 2017 00:44:39 +0000 (19:44 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 6 Nov 2017 00:44:39 +0000 (19:44 -0500)
We can just use the display field directly.

gdk/wayland/gdkdevice-wayland.c
gdk/wayland/gdkdisplay-wayland.c
gdk/wayland/gdkwindow-wayland.c

index 73ce17d87e99564675de0dc52a8453e19f533963..d00524f048b5e7eee202a5011a4a0c80f96f45a1 100644 (file)
@@ -586,7 +586,7 @@ gdk_wayland_device_query_state (GdkDevice        *device,
   GdkWaylandPointerData *pointer;
 
   if (window == NULL)
-    window = gdk_display_get_root_window (gdk_device_get_display (device));
+    window = GDK_WAYLAND_DISPLAY (gdk_device_get_display (device))->root_window;
 
   pointer = GDK_WAYLAND_DEVICE (device)->pointer;
 
index b70c7067718cd59e0858f66469b367b71192a1af..9e6290d3741f702a83f18eb654b8b8c81b0c3b9b 100644 (file)
@@ -2100,7 +2100,7 @@ gdk_wayland_display_remove_output (GdkWaylandDisplay *display_wayland,
       g_object_ref (monitor);
       g_ptr_array_remove (display_wayland->monitors, monitor);
       gdk_display_monitor_removed (GDK_DISPLAY (display_wayland), GDK_MONITOR (monitor));
-      window_update_scale (gdk_display_get_root_window (GDK_MONITOR (monitor)->display));
+      window_update_scale (display_wayland->root_window);
       g_object_unref (monitor);
     }
 }
index 283b60499f9b43c2b2fe19b2761bee79145cb69e..03396528ed18f7edfc465ff0b1f4ecb38773f388 100644 (file)
@@ -3781,7 +3781,7 @@ gdk_wayland_window_new_subsurface (GdkDisplay         *display,
   attr.height = position->height;
   attr.window_type = GDK_WINDOW_SUBSURFACE;
 
-  return gdk_window_new (display, gdk_display_get_root_window (display), &attr);
+  return gdk_window_new (display, NULL, &attr);
 }
 
 /**