forked from AuroraMiddleware/gtk
x11: Stop using gdk_display_get_root_window
Use the backend api for this.
This commit is contained in:
parent
5db2352eba
commit
063db3630b
@ -78,7 +78,7 @@ get_blank_cursor (GdkDisplay *display)
|
||||
cairo_surface_t *surface;
|
||||
cairo_t *cr;
|
||||
|
||||
surface = _gdk_x11_window_create_bitmap_surface (gdk_display_get_root_window (display), 1, 1);
|
||||
surface = _gdk_x11_window_create_bitmap_surface (gdk_x11_display_get_root_window (display), 1, 1);
|
||||
/* Clear surface */
|
||||
cr = cairo_create (surface);
|
||||
cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
|
||||
@ -309,7 +309,7 @@ _gdk_x11_display_get_maximal_cursor_size (GdkDisplay *display,
|
||||
|
||||
g_return_if_fail (GDK_IS_DISPLAY (display));
|
||||
|
||||
window = gdk_display_get_root_window (display);
|
||||
window = gdk_x11_display_get_root_window (display);
|
||||
XQueryBestCursor (GDK_DISPLAY_XDISPLAY (display),
|
||||
GDK_WINDOW_XID (window),
|
||||
128, 128, width, height);
|
||||
|
@ -242,7 +242,7 @@ gdk_x11_device_core_warp (GdkDevice *device,
|
||||
display = gdk_device_get_display (device);
|
||||
xdisplay = GDK_DISPLAY_XDISPLAY (display);
|
||||
screen = GDK_X11_DISPLAY (display)->screen;
|
||||
dest = GDK_WINDOW_XID (gdk_display_get_root_window (display));
|
||||
dest = GDK_WINDOW_XID (gdk_x11_display_get_root_window (display));
|
||||
|
||||
XWarpPointer (xdisplay, None, dest, 0, 0, 0, 0,
|
||||
round (x * GDK_X11_SCREEN (screen)->window_scale),
|
||||
@ -269,7 +269,7 @@ gdk_x11_device_core_query_state (GdkDevice *device,
|
||||
display = gdk_device_get_display (device);
|
||||
screen = GDK_X11_DISPLAY (display)->screen;
|
||||
if (window == NULL)
|
||||
window = gdk_display_get_root_window (display);
|
||||
window = gdk_x11_display_get_root_window (display);
|
||||
impl = GDK_WINDOW_IMPL_X11 (window->impl);
|
||||
|
||||
if (!GDK_X11_DISPLAY (display)->trusted_client ||
|
||||
|
@ -244,7 +244,7 @@ gdk_x11_device_xi2_get_state (GdkDevice *device,
|
||||
GdkWindow *root_window;
|
||||
gint root_x, root_y;
|
||||
|
||||
root_window = gdk_display_get_root_window (gdk_window_get_display (window));
|
||||
root_window = gdk_x11_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,
|
||||
@ -307,7 +307,7 @@ gdk_x11_device_xi2_warp (GdkDevice *device,
|
||||
GdkDisplay *display = gdk_device_get_display (device);
|
||||
GdkScreen *screen = GDK_X11_DISPLAY (display)->screen;
|
||||
|
||||
dest = GDK_WINDOW_XID (gdk_display_get_root_window (display));
|
||||
dest = GDK_WINDOW_XID (gdk_x11_display_get_root_window (display));
|
||||
|
||||
XIWarpPointer (GDK_SCREEN_XDISPLAY (screen),
|
||||
device_xi2->device_id,
|
||||
@ -340,7 +340,7 @@ gdk_x11_device_xi2_query_state (GdkDevice *device,
|
||||
display = gdk_device_get_display (device);
|
||||
default_screen = GDK_X11_DISPLAY (display)->screen;
|
||||
if (window == NULL)
|
||||
window = gdk_display_get_root_window (display);
|
||||
window = gdk_x11_display_get_root_window (display);
|
||||
impl = GDK_WINDOW_IMPL_X11 (window->impl);
|
||||
|
||||
if (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_SLAVE)
|
||||
|
@ -744,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_display_get_root_window (display)),
|
||||
GDK_WINDOW_XID (gdk_x11_display_get_root_window (display)),
|
||||
&event_mask);
|
||||
}
|
||||
|
||||
|
@ -2250,7 +2250,7 @@ broadcast_xmessage (GdkDisplay *display,
|
||||
const char *message)
|
||||
{
|
||||
Display *xdisplay = GDK_DISPLAY_XDISPLAY (display);
|
||||
GdkWindow *root_window = gdk_display_get_root_window (display);
|
||||
GdkWindow *root_window = gdk_x11_display_get_root_window (display);
|
||||
Window xroot_window = GDK_WINDOW_XID (root_window);
|
||||
|
||||
Atom type_atom;
|
||||
|
@ -564,7 +564,7 @@ gdk_window_cache_new (GdkDisplay *display)
|
||||
XWindowAttributes xwa;
|
||||
GdkScreen *screen = GDK_X11_DISPLAY (display)->screen;
|
||||
Display *xdisplay = GDK_SCREEN_XDISPLAY (screen);
|
||||
GdkWindow *root_window = gdk_display_get_root_window (display);
|
||||
GdkWindow *root_window = gdk_x11_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_display_get_root_window (cache->display);
|
||||
GdkWindow *root_window = gdk_x11_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_display_get_root_window (cache->display));
|
||||
return GDK_WINDOW_XID (gdk_x11_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_display_get_root_window (GDK_WINDOW_DISPLAY (x11_context->ipc_window));
|
||||
root = gdk_x11_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_display_get_root_window (GDK_WINDOW_DISPLAY (x11_context->ipc_window));
|
||||
root = gdk_x11_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_display_get_root_window (GDK_WINDOW_DISPLAY (x11_context->ipc_window));
|
||||
root_window = gdk_x11_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)
|
||||
|
@ -379,7 +379,7 @@ _gdk_x11_window_get_property (GdkWindow *window,
|
||||
g_return_val_if_fail (!window || GDK_WINDOW_IS_X11 (window), FALSE);
|
||||
|
||||
if (!window)
|
||||
window = gdk_display_get_root_window (gdk_display_get_default ());
|
||||
window = gdk_x11_display_get_root_window (gdk_display_get_default ());
|
||||
else if (!GDK_WINDOW_IS_X11 (window))
|
||||
return FALSE;
|
||||
|
||||
@ -510,7 +510,7 @@ _gdk_x11_window_change_property (GdkWindow *window,
|
||||
g_return_if_fail (!window || GDK_WINDOW_IS_X11 (window));
|
||||
|
||||
if (!window)
|
||||
window = gdk_display_get_root_window (gdk_display_get_default ());
|
||||
window = gdk_x11_display_get_root_window (gdk_display_get_default ());
|
||||
else if (!GDK_WINDOW_IS_X11 (window))
|
||||
return;
|
||||
|
||||
@ -560,7 +560,7 @@ _gdk_x11_window_delete_property (GdkWindow *window,
|
||||
g_return_if_fail (!window || GDK_WINDOW_IS_X11 (window));
|
||||
|
||||
if (!window)
|
||||
window = gdk_display_get_root_window (gdk_display_get_default ());
|
||||
window = gdk_x11_display_get_root_window (gdk_display_get_default ());
|
||||
else if (!GDK_WINDOW_IS_X11 (window))
|
||||
return;
|
||||
|
||||
|
@ -215,7 +215,7 @@ gdk_x11_screen_get_work_area (GdkScreen *screen,
|
||||
Display *display;
|
||||
|
||||
display = GDK_SCREEN_XDISPLAY (screen);
|
||||
root_window = gdk_display_get_root_window (GDK_SCREEN_DISPLAY (screen));
|
||||
root_window = gdk_x11_display_get_root_window (GDK_SCREEN_DISPLAY (screen));
|
||||
workarea = XInternAtom (display, "_NET_WORKAREA", True);
|
||||
|
||||
/* Defaults in case of error */
|
||||
@ -910,7 +910,7 @@ _gdk_x11_screen_get_edge_monitors (GdkScreen *screen,
|
||||
{
|
||||
#ifdef HAVE_XFREE_XINERAMA
|
||||
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
|
||||
GdkWindow *root_window = gdk_display_get_root_window (GDK_SCREEN_DISPLAY (screen));
|
||||
GdkWindow *root_window = gdk_x11_display_get_root_window (GDK_SCREEN_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;
|
||||
|
@ -1149,9 +1149,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_display_get_root_window (display);
|
||||
|
||||
win->parent->children = g_list_concat (&win->children_list_node, win->parent->children);
|
||||
win->parent = NULL;
|
||||
|
||||
impl->xid = window;
|
||||
|
||||
@ -1701,8 +1699,8 @@ _gdk_x11_window_set_window_scale (GdkWindow *window,
|
||||
if (window->window_type == GDK_WINDOW_FOREIGN)
|
||||
XMoveWindow (GDK_WINDOW_XDISPLAY (window),
|
||||
GDK_WINDOW_XID (window),
|
||||
(window->x + window->parent->abs_x) * impl->window_scale,
|
||||
(window->y + window->parent->abs_y) * impl->window_scale);
|
||||
window->x * impl->window_scale,
|
||||
window->y * impl->window_scale);
|
||||
else
|
||||
{
|
||||
if (impl->override_redirect)
|
||||
|
Loading…
Reference in New Issue
Block a user