From 047eac5a96dcf1535c396fb257d13767874e82ae Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 1 Nov 2017 18:39:05 -0400 Subject: [PATCH] x11: Add backend api to get the screen gdk_display_get_default_screen is gone, but we still have x11-specific screen apis that GTK+ is using, so we need an alterative way to get the screen object. --- gdk/x11/gdkdisplay-x11.c | 6 ++++++ gdk/x11/gdkx11display.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index fc59079e5e..c40bc97403 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -2994,6 +2994,12 @@ gdk_x11_set_sm_client_id (const gchar *sm_client_id) g_slist_free (displays); } +GdkScreen * +gdk_x11_display_get_screen (GdkDisplay *display) +{ + return GDK_X11_DISPLAY (display)->screen; +} + static gint pop_error_trap (GdkDisplay *display, gboolean ignored) diff --git a/gdk/x11/gdkx11display.h b/gdk/x11/gdkx11display.h index 445f024f10..93d9aa61fb 100644 --- a/gdk/x11/gdkx11display.h +++ b/gdk/x11/gdkx11display.h @@ -83,6 +83,9 @@ void gdk_x11_display_broadcast_startup_message (GdkDisplay *display, GDK_AVAILABLE_IN_ALL GdkDisplay *gdk_x11_lookup_xdisplay (Display *xdisplay); +GDK_AVAILABLE_IN_3_94 +GdkScreen *gdk_x11_display_get_screen (GdkDisplay *display); + GDK_AVAILABLE_IN_ALL void gdk_x11_display_grab (GdkDisplay *display); GDK_AVAILABLE_IN_ALL