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.
This commit is contained in:
Matthias Clasen 2017-11-01 18:39:05 -04:00
parent 8144d31ebe
commit 047eac5a96
2 changed files with 9 additions and 0 deletions

View File

@ -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)

View File

@ -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