[gtk+] x11: Add backend api to get the screen



commit 047eac5a96dcf1535c396fb257d13767874e82ae
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Nov 1 18:39:05 2017 -0400

    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(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index fc59079..c40bc97 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 445f024..93d9aa6 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


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