diff options
-rw-r--r-- | gdk/broadway/gdkdevice-broadway.c | 4 | ||||
-rw-r--r-- | gdk/broadway/gdkeventsource.c | 2 | ||||
-rw-r--r-- | gdk/gdkdisplay.c | 8 | ||||
-rw-r--r-- | gdk/gdkdisplayprivate.h | 1 | ||||
-rw-r--r-- | gdk/gdkwindow.c | 14 | ||||
-rw-r--r-- | gdk/wayland/gdkwindow-wayland.c | 4 | ||||
-rw-r--r-- | gdk/win32/gdkdevice-wintab.c | 2 | ||||
-rw-r--r-- | gdk/win32/gdkdevicemanager-win32.c | 2 | ||||
-rw-r--r-- | gdk/win32/gdkevents-win32.c | 2 | ||||
-rw-r--r-- | gdk/win32/gdkproperty-win32.c | 7 | ||||
-rw-r--r-- | gdk/win32/gdkwindow-win32.c | 2 | ||||
-rw-r--r-- | gdk/x11/gdkcursor-x11.c | 14 | ||||
-rw-r--r-- | gdk/x11/gdkdevice-core-x11.c | 4 | ||||
-rw-r--r-- | gdk/x11/gdkdevice-xi2.c | 6 | ||||
-rw-r--r-- | gdk/x11/gdkdevicemanager-xi2.c | 4 | ||||
-rw-r--r-- | gdk/x11/gdkdisplay-x11.c | 3 | ||||
-rw-r--r-- | gdk/x11/gdkdnd-x11.c | 12 | ||||
-rw-r--r-- | gdk/x11/gdkmonitor-x11.c | 1 | ||||
-rw-r--r-- | gdk/x11/gdkproperty-x11.c | 17 | ||||
-rw-r--r-- | gdk/x11/gdkscreen-x11.c | 4 | ||||
-rw-r--r-- | gdk/x11/gdkwindow-x11.c | 2 | ||||
-rw-r--r-- | gdk/x11/xsettings-client.c | 4 |
22 files changed, 46 insertions, 73 deletions
diff --git a/gdk/broadway/gdkdevice-broadway.c b/gdk/broadway/gdkdevice-broadway.c index b05d444932..b33a847e1a 100644 --- a/gdk/broadway/gdkdevice-broadway.c +++ b/gdk/broadway/gdkdevice-broadway.c @@ -333,12 +333,10 @@ gdk_broadway_device_window_at_position (GdkDevice *device, GdkModifierType *mask, gboolean get_toplevel) { - GdkScreen *screen; GdkWindow *root_window; GdkWindow *window; - screen = gdk_display_get_default_screen (gdk_device_get_display (device)); - root_window = gdk_screen_get_root_window (screen); + root_window = gdk_display_get_root_window (gdk_device_get_display (device)); gdk_broadway_device_query_state (device, root_window, &window, NULL, NULL, win_x, win_y, mask); diff --git a/gdk/broadway/gdkeventsource.c b/gdk/broadway/gdkeventsource.c index 0c4612a6ed..e02421ada8 100644 --- a/gdk/broadway/gdkeventsource.c +++ b/gdk/broadway/gdkeventsource.c @@ -351,7 +351,7 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message) case BROADWAY_EVENT_SCREEN_SIZE_CHANGED: screen = gdk_display_get_default_screen (display); - window = gdk_screen_get_root_window (screen); + window = gdk_display_get_root_window (display); window->width = message->screen_resize_notify.width; window->height = message->screen_resize_notify.height; diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c index 3af5dc5025..e05feb37ee 100644 --- a/gdk/gdkdisplay.c +++ b/gdk/gdkdisplay.c @@ -2250,6 +2250,12 @@ gdk_display_setting_changed (GdkDisplay *display, g_signal_emit (display, signals[SETTING_CHANGED], 0, name); } +GdkWindow * +gdk_display_get_root_window (GdkDisplay *display) +{ + return GDK_DISPLAY_GET_CLASS (display)->get_root_window (display); +} + GList * gdk_display_get_toplevel_windows (GdkDisplay *display) { @@ -2257,7 +2263,7 @@ gdk_display_get_toplevel_windows (GdkDisplay *display) GList *new_list = NULL; GList *tmp_list; - root_window = GDK_DISPLAY_GET_CLASS (display)->get_root_window (display); + root_window = gdk_display_get_root_window (display); tmp_list = root_window->children; while (tmp_list) diff --git a/gdk/gdkdisplayprivate.h b/gdk/gdkdisplayprivate.h index 463a6199ce..b526b265b1 100644 --- a/gdk/gdkdisplayprivate.h +++ b/gdk/gdkdisplayprivate.h @@ -308,6 +308,7 @@ void gdk_display_emit_opened (GdkDisplay *display void gdk_display_setting_changed (GdkDisplay *display, const char *name); +GdkWindow * gdk_display_get_root_window (GdkDisplay *display); GList * gdk_display_get_toplevel_windows (GdkDisplay *display); G_END_DECLS diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index ac7b1913f0..b6d686f5b5 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -983,7 +983,7 @@ gdk_window_new (GdkDisplay *display, g_return_val_if_fail (attributes != NULL, NULL); if (!parent) - parent = gdk_screen_get_root_window (gdk_display_get_default_screen (display)); + parent = gdk_display_get_root_window (display); g_return_val_if_fail (GDK_IS_WINDOW (parent), NULL); @@ -3378,7 +3378,7 @@ gdk_window_get_device_position (GdkWindow *window, GdkWindow * gdk_get_default_root_window (void) { - return gdk_screen_get_root_window (gdk_screen_get_default ()); + return gdk_display_get_root_window (gdk_display_get_default ()); } @@ -4581,7 +4581,7 @@ gdk_window_get_geometry (GdkWindow *window, GdkWindowImplClass *impl_class; if (!window) - window = gdk_screen_get_root_window ((gdk_screen_get_default ())); + window = gdk_display_get_root_window ((gdk_display_get_default ())); g_return_if_fail (GDK_IS_WINDOW (window)); @@ -6162,17 +6162,11 @@ gdk_window_create_similar_image_surface (GdkWindow * window, { GdkWindowImplClass *impl_class; cairo_surface_t *window_surface, *surface; - GdkDisplay *display; - GdkScreen *screen; g_return_val_if_fail (window ==NULL || GDK_IS_WINDOW (window), NULL); if (window == NULL) - { - display = gdk_display_get_default (); - screen = gdk_display_get_default_screen (display); - window = gdk_screen_get_root_window (screen); - } + window = gdk_display_get_root_window (gdk_display_get_default ()); impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl); diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index f501e09d4b..bb070d330f 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -3814,9 +3814,7 @@ gdk_wayland_window_new_subsurface (GdkDisplay *display, attr.height = position->height; attr.window_type = GDK_WINDOW_SUBSURFACE; - return gdk_window_new (display, - gdk_screen_get_root_window (gdk_display_get_default_screen (display)), - &attr); + return gdk_window_new (display, gdk_display_get_root_window (display), &attr); } /** diff --git a/gdk/win32/gdkdevice-wintab.c b/gdk/win32/gdkdevice-wintab.c index 884977b2c3..26991a7dda 100644 --- a/gdk/win32/gdkdevice-wintab.c +++ b/gdk/win32/gdkdevice-wintab.c @@ -222,7 +222,7 @@ _gdk_device_wintab_translate_axes (GdkDeviceWintab *device_wintab, gint i; device = GDK_DEVICE (device_wintab); - root_window = gdk_screen_get_root_window (gdk_window_get_screen (window)); + root_window = gdk_display_get_root_window (gdk_window_get_display (window)); impl_window = _gdk_window_get_impl_window (window); temp_x = temp_y = 0; diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c index ac5d5a71d3..cdd4be76a3 100644 --- a/gdk/win32/gdkdevicemanager-win32.c +++ b/gdk/win32/gdkdevicemanager-win32.c @@ -353,7 +353,7 @@ static void wintab_init_check (GdkDeviceManagerWin32 *device_manager) { GdkDisplay *display = gdk_device_manager_get_display (GDK_DEVICE_MANAGER (device_manager)); - GdkWindow *root = gdk_screen_get_root_window (gdk_display_get_default_screen (display)); + GdkWindow *root = gdk_display_get_root_window (display); static gboolean wintab_initialized = FALSE; GdkDeviceWintab *device; WORD specversion; diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c index f41cbc3257..3d7d6ae196 100644 --- a/gdk/win32/gdkevents-win32.c +++ b/gdk/win32/gdkevents-win32.c @@ -2169,7 +2169,7 @@ gdk_event_translate (MSG *msg, { /* Apply global filters */ - GdkFilterReturn result = apply_event_filters (window ? window : gdk_screen_get_root_window (gdk_display_get_default_screen (display)), + GdkFilterReturn result = apply_event_filters (window ? window : gdk_display_get_root_window (display), msg, &_gdk_default_filters); diff --git a/gdk/win32/gdkproperty-win32.c b/gdk/win32/gdkproperty-win32.c index 0c70a92932..ebd53d526f 100644 --- a/gdk/win32/gdkproperty-win32.c +++ b/gdk/win32/gdkproperty-win32.c @@ -294,12 +294,7 @@ _gdk_win32_window_delete_property (GdkWindow *window, if (property == _gdk_selection) _gdk_selection_property_delete (window); else if (property == _wm_transient_for) - { - GdkScreen *screen; - - screen = gdk_window_get_screen (window); - gdk_window_set_transient_for (window, gdk_screen_get_root_window (screen)); - } + gdk_window_set_transient_for (window, gdk_display_get_root_window (gdk_window_get_display (window))); else { prop_name = gdk_atom_name (property); diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c index 2e98e0ce93..dcb70162ad 100644 --- a/gdk/win32/gdkwindow-win32.c +++ b/gdk/win32/gdkwindow-win32.c @@ -486,7 +486,7 @@ _gdk_win32_window_enable_transparency (GdkWindow *window) if (!gdk_display_is_composited (gdk_window_get_display (window))) return FALSE; - if (window == gdk_screen_get_root_window (screen)) + if (window == gdk_display_get_root_window (gdk_window_get_display (window))) return FALSE; thiswindow = GDK_WINDOW_HWND (window); diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c index 1895ba9e58..c3e86a8533 100644 --- a/gdk/x11/gdkcursor-x11.c +++ b/gdk/x11/gdkcursor-x11.c @@ -208,15 +208,13 @@ gdk_x11_cursor_init (GdkX11Cursor *cursor) static Cursor get_blank_cursor (GdkDisplay *display) { - GdkScreen *screen; Pixmap pixmap; XColor color; Cursor cursor; cairo_surface_t *surface; cairo_t *cr; - screen = gdk_display_get_default_screen (display); - surface = _gdk_x11_window_create_bitmap_surface (gdk_screen_get_root_window (screen), 1, 1); + surface = _gdk_x11_window_create_bitmap_surface (gdk_display_get_root_window (display), 1, 1); /* Clear surface */ cr = cairo_create (surface); cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); @@ -845,9 +843,7 @@ _gdk_x11_display_get_cursor_for_surface (GdkDisplay *display, g_object_unref (pixbuf); - screen = gdk_display_get_default_screen (display); - - pixmap = _gdk_x11_window_create_bitmap_surface (gdk_screen_get_root_window (screen), + pixmap = _gdk_x11_window_create_bitmap_surface (gdk_display_get_root_window (display), width, height); cr = cairo_create (pixmap); image = cairo_image_surface_create_for_data (data, CAIRO_FORMAT_A1, @@ -858,7 +854,7 @@ _gdk_x11_display_get_cursor_for_surface (GdkDisplay *display, cairo_paint (cr); cairo_destroy (cr); - mask = _gdk_x11_window_create_bitmap_surface (gdk_screen_get_root_window (screen), + mask = _gdk_x11_window_create_bitmap_surface (gdk_display_get_root_window (display), width, height); cr = cairo_create (mask); image = cairo_image_surface_create_for_data (mask_data, CAIRO_FORMAT_A1, @@ -920,13 +916,11 @@ _gdk_x11_display_get_maximal_cursor_size (GdkDisplay *display, guint *width, guint *height) { - GdkScreen *screen; GdkWindow *window; g_return_if_fail (GDK_IS_DISPLAY (display)); - screen = gdk_display_get_default_screen (display); - window = gdk_screen_get_root_window (screen); + window = gdk_display_get_root_window (display); XQueryBestCursor (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (window), 128, 128, width, height); diff --git a/gdk/x11/gdkdevice-core-x11.c b/gdk/x11/gdkdevice-core-x11.c index 4f001e763c..8c9bf437d5 100644 --- a/gdk/x11/gdkdevice-core-x11.c +++ b/gdk/x11/gdkdevice-core-x11.c @@ -239,7 +239,7 @@ gdk_x11_device_core_warp (GdkDevice *device, xdisplay = GDK_DISPLAY_XDISPLAY (gdk_device_get_display (device)); screen = gdk_display_get_default_screen (gdk_device_get_display (device)); - dest = GDK_WINDOW_XID (gdk_screen_get_root_window (screen)); + dest = GDK_WINDOW_XID (gdk_display_get_root_window (gdk_device_get_display (device))); XWarpPointer (xdisplay, None, dest, 0, 0, 0, 0, round (x * GDK_X11_SCREEN (screen)->window_scale), @@ -266,7 +266,7 @@ gdk_x11_device_core_query_state (GdkDevice *device, display = gdk_device_get_display (device); default_screen = gdk_display_get_default_screen (display); if (window == NULL) - window = gdk_screen_get_root_window (default_screen); + window = gdk_display_get_root_window (display); impl = GDK_WINDOW_IMPL_X11 (window->impl); if (!GDK_X11_DISPLAY (display)->trusted_client || diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c index 83d865e984..e8c3c79f67 100644 --- a/gdk/x11/gdkdevice-xi2.c +++ b/gdk/x11/gdkdevice-xi2.c @@ -244,7 +244,7 @@ gdk_x11_device_xi2_get_state (GdkDevice *device, GdkWindow *root_window; gint root_x, root_y; - root_window = gdk_screen_get_root_window (gdk_display_get_default_screen (gdk_window_get_display (window))); + root_window = gdk_display_get_root_window (gdk_window_get_display (window)); /* FIXME: Maybe root coords chaching should happen here */ gdk_window_get_origin (window, &root_x, &root_y); _gdk_device_translate_screen_coord (device, window, @@ -306,7 +306,7 @@ gdk_x11_device_xi2_warp (GdkDevice *device, Window dest; GdkScreen *screen = gdk_screen_get_default (); - dest = GDK_WINDOW_XID (gdk_screen_get_root_window (screen)); + dest = GDK_WINDOW_XID (gdk_display_get_root_window (gdk_device_get_display (device))); XIWarpPointer (GDK_SCREEN_XDISPLAY (screen), device_xi2->device_id, @@ -339,7 +339,7 @@ gdk_x11_device_xi2_query_state (GdkDevice *device, display = gdk_device_get_display (device); default_screen = gdk_display_get_default_screen (display); if (window == NULL) - window = gdk_screen_get_root_window (default_screen); + window = gdk_display_get_root_window (display); impl = GDK_WINDOW_IMPL_X11 (window->impl); if (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_SLAVE) diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c index 9ae5d5c420..f2660d1737 100644 --- a/gdk/x11/gdkdevicemanager-xi2.c +++ b/gdk/x11/gdkdevicemanager-xi2.c @@ -679,7 +679,6 @@ gdk_x11_device_manager_xi2_constructed (GObject *object) { GdkX11DeviceManagerXI2 *device_manager; GdkDisplay *display; - GdkScreen *screen; GHashTable *masters, *slaves; Display *xdisplay; XIDeviceInfo *info, *dev; @@ -736,7 +735,6 @@ gdk_x11_device_manager_xi2_constructed (GObject *object) g_hash_table_destroy (slaves); /* Connect to hierarchy change events */ - screen = gdk_display_get_default_screen (display); XISetMask (mask, XI_HierarchyChanged); XISetMask (mask, XI_DeviceChanged); XISetMask (mask, XI_PropertyEvent); @@ -746,7 +744,7 @@ gdk_x11_device_manager_xi2_constructed (GObject *object) event_mask.mask = mask; _gdk_x11_device_manager_xi2_select_events (GDK_DEVICE_MANAGER (object), - GDK_WINDOW_XID (gdk_screen_get_root_window (screen)), + GDK_WINDOW_XID (gdk_display_get_root_window (display)), &event_mask); } diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index 768d91dd24..af54a994f1 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -2236,8 +2236,7 @@ broadcast_xmessage (GdkDisplay *display, const char *message) { Display *xdisplay = GDK_DISPLAY_XDISPLAY (display); - GdkScreen *screen = gdk_display_get_default_screen (display); - GdkWindow *root_window = gdk_screen_get_root_window (screen); + GdkWindow *root_window = gdk_display_get_root_window (display); Window xroot_window = GDK_WINDOW_XID (root_window); Atom type_atom; diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c index 918d5e929f..92f0414598 100644 --- a/gdk/x11/gdkdnd-x11.c +++ b/gdk/x11/gdkdnd-x11.c @@ -564,7 +564,7 @@ gdk_window_cache_new (GdkDisplay *display) XWindowAttributes xwa; GdkScreen *screen = gdk_display_get_default_screen (display); Display *xdisplay = GDK_SCREEN_XDISPLAY (screen); - GdkWindow *root_window = gdk_screen_get_root_window (screen); + GdkWindow *root_window = gdk_display_get_root_window (display); GdkChildInfoX11 *children; guint nchildren, i; #ifdef HAVE_XCOMPOSITE @@ -649,7 +649,7 @@ gdk_window_cache_new (GdkDisplay *display) static void gdk_window_cache_destroy (GdkWindowCache *cache) { - GdkWindow *root_window = gdk_screen_get_root_window (gdk_display_get_default_screen (cache->display)); + GdkWindow *root_window = gdk_display_get_root_window (cache->display); XSelectInput (GDK_WINDOW_XDISPLAY (root_window), GDK_WINDOW_XID (root_window), @@ -858,7 +858,7 @@ get_client_window_at_coords (GdkWindowCache *cache, if (retval) return retval; else - return GDK_WINDOW_XID (gdk_screen_get_root_window (gdk_display_get_default_screen (cache->display))); + return GDK_WINDOW_XID (gdk_display_get_root_window (cache->display)); } #ifdef G_ENABLE_DEBUG @@ -2678,7 +2678,7 @@ drag_context_grab (GdkDragContext *context) if (!x11_context->ipc_window) return FALSE; - root = gdk_screen_get_root_window (GDK_WINDOW_SCREEN (x11_context->ipc_window)); + root = gdk_display_get_root_window (GDK_WINDOW_DISPLAY (x11_context->ipc_window)); seat = gdk_device_get_seat (gdk_drag_context_get_device (context)); #ifdef XINPUT_2 @@ -2767,7 +2767,7 @@ drag_context_ungrab (GdkDragContext *context) gdk_seat_ungrab (x11_context->grab_seat); keyboard = gdk_seat_get_keyboard (x11_context->grab_seat); - root = gdk_screen_get_root_window (GDK_WINDOW_SCREEN (x11_context->ipc_window)); + root = gdk_display_get_root_window (GDK_WINDOW_DISPLAY (x11_context->ipc_window)); g_clear_object (&x11_context->grab_seat); for (i = 0; i < G_N_ELEMENTS (grab_keys); ++i) @@ -3030,7 +3030,7 @@ gdk_dnd_handle_key_event (GdkDragContext *context, * to query it here. We could use XGetModifierMapping, but * that would be overkill. */ - root_window = gdk_screen_get_root_window (GDK_WINDOW_SCREEN (x11_context->ipc_window)); + root_window = gdk_display_get_root_window (GDK_WINDOW_DISPLAY (x11_context->ipc_window)); gdk_window_get_device_position (root_window, pointer, NULL, NULL, &state); if (dx != 0 || dy != 0) diff --git a/gdk/x11/gdkmonitor-x11.c b/gdk/x11/gdkmonitor-x11.c index a2d5caa29d..1cd37a5483 100644 --- a/gdk/x11/gdkmonitor-x11.c +++ b/gdk/x11/gdkmonitor-x11.c @@ -22,6 +22,7 @@ #include "gdkmonitor-x11.h" #include "gdkscreen-x11.h" +#include "gdkdisplayprivate.h" G_DEFINE_TYPE (GdkX11Monitor, gdk_x11_monitor, GDK_TYPE_MONITOR) diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c index 4fabb97f66..47cdfb21b9 100644 --- a/gdk/x11/gdkproperty-x11.c +++ b/gdk/x11/gdkproperty-x11.c @@ -379,10 +379,7 @@ _gdk_x11_window_get_property (GdkWindow *window, g_return_val_if_fail (!window || GDK_WINDOW_IS_X11 (window), FALSE); if (!window) - { - GdkScreen *screen = gdk_screen_get_default (); - window = gdk_screen_get_root_window (screen); - } + window = gdk_display_get_root_window (gdk_display_get_default ()); else if (!GDK_WINDOW_IS_X11 (window)) return FALSE; @@ -513,12 +510,7 @@ _gdk_x11_window_change_property (GdkWindow *window, g_return_if_fail (!window || GDK_WINDOW_IS_X11 (window)); if (!window) - { - GdkScreen *screen; - - screen = gdk_screen_get_default (); - window = gdk_screen_get_root_window (screen); - } + window = gdk_display_get_root_window (gdk_display_get_default ()); else if (!GDK_WINDOW_IS_X11 (window)) return; @@ -568,10 +560,7 @@ _gdk_x11_window_delete_property (GdkWindow *window, g_return_if_fail (!window || GDK_WINDOW_IS_X11 (window)); if (!window) - { - GdkScreen *screen = gdk_screen_get_default (); - window = gdk_screen_get_root_window (screen); - } + window = gdk_display_get_root_window (gdk_display_get_default ()); else if (!GDK_WINDOW_IS_X11 (window)) return; diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c index 61303088a4..caf4866711 100644 --- a/gdk/x11/gdkscreen-x11.c +++ b/gdk/x11/gdkscreen-x11.c @@ -223,7 +223,7 @@ gdk_x11_screen_get_work_area (GdkScreen *screen, display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen)); disp_screen = GDK_SCREEN_XNUMBER (screen); - root_window = gdk_screen_get_root_window (screen); + root_window = gdk_display_get_root_window (gdk_screen_get_display (screen)); workarea = XInternAtom (display, "_NET_WORKAREA", True); /* Defaults in case of error */ @@ -923,7 +923,7 @@ _gdk_x11_screen_get_edge_monitors (GdkScreen *screen, { #ifdef HAVE_XFREE_XINERAMA GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen); - GdkWindow *root_window = gdk_screen_get_root_window (screen); + GdkWindow *root_window = gdk_display_get_root_window (gdk_screen_get_display (screen)); gint top_most_pos = gdk_window_get_height (root_window); gint left_most_pos = gdk_window_get_width (root_window); gint bottom_most_pos = 0; diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index c5651980b6..d080b7a0a7 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -1136,7 +1136,7 @@ gdk_x11_window_foreign_new_for_display (GdkDisplay *display, impl->window_scale = GDK_X11_SCREEN (screen)->window_scale; /* Always treat foreigns as toplevels */ - win->parent = gdk_screen_get_root_window (screen); + win->parent = gdk_display_get_root_window (display); win->parent->children = g_list_concat (&win->children_list_node, win->parent->children); diff --git a/gdk/x11/xsettings-client.c b/gdk/x11/xsettings-client.c index 8bb67b50c3..b661b7a97d 100644 --- a/gdk/x11/xsettings-client.c +++ b/gdk/x11/xsettings-client.c @@ -572,7 +572,7 @@ gdk_xsettings_manager_window_filter (GdkXEvent *xevent, void _gdk_x11_xsettings_init (GdkX11Screen *x11_screen) { - gdk_window_add_filter (gdk_screen_get_root_window (GDK_SCREEN (x11_screen)), gdk_xsettings_root_window_filter, x11_screen); + gdk_window_add_filter (gdk_display_get_root_window (x11_screen->display), gdk_xsettings_root_window_filter, x11_screen); check_manager_window (x11_screen, FALSE); } @@ -586,7 +586,7 @@ _gdk_x11_settings_force_reread (GdkX11Screen *x11_screen) void _gdk_x11_xsettings_finish (GdkX11Screen *x11_screen) { - gdk_window_remove_filter (gdk_screen_get_root_window (GDK_SCREEN (x11_screen)), gdk_xsettings_root_window_filter, x11_screen); + gdk_window_remove_filter (gdk_display_get_root_window (x11_screen->display), gdk_xsettings_root_window_filter, x11_screen); if (x11_screen->xsettings_manager_window) { gdk_window_remove_filter (x11_screen->xsettings_manager_window, gdk_xsettings_manager_window_filter, x11_screen); |