diff options
author | Matthias Clasen <mclasen@redhat.com> | 2017-10-31 21:22:57 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-10-31 21:27:24 -0400 |
commit | 463fba18a666ab00bbf8969e4353cf59857aaa8b (patch) | |
tree | abbe6eaabdea93f88265042ed56e2ca6fb88cbeb /gdk/x11/gdkcursor-x11.c | |
parent | 68a61e9ac6c7c1be5cc8c3c31450296afc107634 (diff) | |
download | gtk+-463fba18a666ab00bbf8969e4353cf59857aaa8b.tar.gz |
Port to gdk_display_get_root_window
This is the replacement for the GdkScreen api of the same name.
Diffstat (limited to 'gdk/x11/gdkcursor-x11.c')
-rw-r--r-- | gdk/x11/gdkcursor-x11.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c index 1895ba9e58..c3e86a8533 100644 --- a/gdk/x11/gdkcursor-x11.c +++ b/gdk/x11/gdkcursor-x11.c @@ -208,15 +208,13 @@ gdk_x11_cursor_init (GdkX11Cursor *cursor) static Cursor get_blank_cursor (GdkDisplay *display) { - GdkScreen *screen; Pixmap pixmap; XColor color; Cursor cursor; cairo_surface_t *surface; cairo_t *cr; - screen = gdk_display_get_default_screen (display); - surface = _gdk_x11_window_create_bitmap_surface (gdk_screen_get_root_window (screen), 1, 1); + surface = _gdk_x11_window_create_bitmap_surface (gdk_display_get_root_window (display), 1, 1); /* Clear surface */ cr = cairo_create (surface); cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); @@ -845,9 +843,7 @@ _gdk_x11_display_get_cursor_for_surface (GdkDisplay *display, g_object_unref (pixbuf); - screen = gdk_display_get_default_screen (display); - - pixmap = _gdk_x11_window_create_bitmap_surface (gdk_screen_get_root_window (screen), + pixmap = _gdk_x11_window_create_bitmap_surface (gdk_display_get_root_window (display), width, height); cr = cairo_create (pixmap); image = cairo_image_surface_create_for_data (data, CAIRO_FORMAT_A1, @@ -858,7 +854,7 @@ _gdk_x11_display_get_cursor_for_surface (GdkDisplay *display, cairo_paint (cr); cairo_destroy (cr); - mask = _gdk_x11_window_create_bitmap_surface (gdk_screen_get_root_window (screen), + mask = _gdk_x11_window_create_bitmap_surface (gdk_display_get_root_window (display), width, height); cr = cairo_create (mask); image = cairo_image_surface_create_for_data (mask_data, CAIRO_FORMAT_A1, @@ -920,13 +916,11 @@ _gdk_x11_display_get_maximal_cursor_size (GdkDisplay *display, guint *width, guint *height) { - GdkScreen *screen; GdkWindow *window; g_return_if_fail (GDK_IS_DISPLAY (display)); - screen = gdk_display_get_default_screen (display); - window = gdk_screen_get_root_window (screen); + window = gdk_display_get_root_window (display); XQueryBestCursor (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (window), 128, 128, width, height); |