From 2eb78a2374a819c7d1be63dd0c700355e6bf50dc Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 5 Nov 2017 19:44:39 -0500 Subject: [PATCH] wayland: Stop using gdk_display_get_root_window We can just use the display field directly. --- gdk/wayland/gdkdevice-wayland.c | 2 +- gdk/wayland/gdkdisplay-wayland.c | 2 +- gdk/wayland/gdkwindow-wayland.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 73ce17d87e..d00524f048 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -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; diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index b70c706771..9e6290d374 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -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); } } diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 283b60499f..03396528ed 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -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); } /**