forked from AuroraMiddleware/gtk
x11: Add API to query root window and screen from GdkDisplay
This commit is contained in:
parent
8f55647fbb
commit
f33c20920b
@ -898,6 +898,8 @@ gdk_x11_display_broadcast_startup_message
|
|||||||
gdk_x11_display_get_startup_notification_id
|
gdk_x11_display_get_startup_notification_id
|
||||||
gdk_x11_display_set_startup_notification_id
|
gdk_x11_display_set_startup_notification_id
|
||||||
gdk_x11_display_get_xdisplay
|
gdk_x11_display_get_xdisplay
|
||||||
|
gdk_x11_display_get_xscreen
|
||||||
|
gdk_x11_display_get_xrootwindow
|
||||||
gdk_x11_display_grab
|
gdk_x11_display_grab
|
||||||
gdk_x11_display_ungrab
|
gdk_x11_display_ungrab
|
||||||
gdk_x11_display_error_trap_push
|
gdk_x11_display_error_trap_push
|
||||||
|
@ -2179,9 +2179,46 @@ Display *
|
|||||||
gdk_x11_display_get_xdisplay (GdkDisplay *display)
|
gdk_x11_display_get_xdisplay (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||||
|
|
||||||
return GDK_X11_DISPLAY (display)->xdisplay;
|
return GDK_X11_DISPLAY (display)->xdisplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_x11_display_get_xscreen:
|
||||||
|
* @display: (type GdkX11Display): a #GdkDisplay
|
||||||
|
*
|
||||||
|
* Returns the X Screen used by #GdkDisplay.
|
||||||
|
*
|
||||||
|
* Returns: (transfer none): an X Screen
|
||||||
|
*
|
||||||
|
* Since: 3.94
|
||||||
|
*/
|
||||||
|
Screen *
|
||||||
|
gdk_x11_display_get_xscreen (GdkDisplay *display)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||||
|
|
||||||
|
return GDK_X11_SCREEN (GDK_X11_DISPLAY (display)->screen)->xscreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gdk_x11_display_get_xrootwindow:
|
||||||
|
* @display: (type GdkX11Display): a #GdkDisplay
|
||||||
|
*
|
||||||
|
* Returns the root X window used by #GdkDisplay.
|
||||||
|
*
|
||||||
|
* Returns: (transfer none): an X Window
|
||||||
|
*
|
||||||
|
* Since: 3.94
|
||||||
|
*/
|
||||||
|
Window
|
||||||
|
gdk_x11_display_get_xrootwindow (GdkDisplay *display)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GDK_IS_DISPLAY (display), None);
|
||||||
|
|
||||||
|
return GDK_SCREEN_XROOTWIN (GDK_X11_DISPLAY (display)->screen);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gdk_x11_display_make_default (GdkDisplay *display)
|
gdk_x11_display_make_default (GdkDisplay *display)
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,11 @@ GDK_AVAILABLE_IN_3_94
|
|||||||
GdkDisplay * gdk_x11_display_open (const char *display_name);
|
GdkDisplay * gdk_x11_display_open (const char *display_name);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
Display *gdk_x11_display_get_xdisplay (GdkDisplay *display);
|
Display * gdk_x11_display_get_xdisplay (GdkDisplay *display);
|
||||||
|
GDK_AVAILABLE_IN_3_94
|
||||||
|
Screen * gdk_x11_display_get_xscreen (GdkDisplay *display);
|
||||||
|
GDK_AVAILABLE_IN_3_94
|
||||||
|
Window gdk_x11_display_get_xrootwindow (GdkDisplay *display);
|
||||||
|
|
||||||
#define GDK_DISPLAY_XDISPLAY(display) (gdk_x11_display_get_xdisplay (display))
|
#define GDK_DISPLAY_XDISPLAY(display) (gdk_x11_display_get_xdisplay (display))
|
||||||
|
|
||||||
|
@ -532,8 +532,8 @@ _gtk_mount_operation_lookup_context_get (GdkDisplay *display)
|
|||||||
|
|
||||||
mapping = NULL;
|
mapping = NULL;
|
||||||
mapping_length = 0;
|
mapping_length = 0;
|
||||||
get_window_list (GDK_DISPLAY_XDISPLAY (context->display),
|
get_window_list (gdk_x11_display_get_xdisplay (context->display),
|
||||||
GDK_ROOT_WINDOW(),
|
gdk_x11_display_get_xrootwindow (context->display),
|
||||||
gdk_x11_get_xatom_by_name_for_display (context->display,
|
gdk_x11_get_xatom_by_name_for_display (context->display,
|
||||||
"_NET_CLIENT_LIST"),
|
"_NET_CLIENT_LIST"),
|
||||||
&mapping,
|
&mapping,
|
||||||
|
Loading…
Reference in New Issue
Block a user