This is an automated email from the git hooks/post-receive script. o c h o s i p u s h e d a c o m m i t t o b r a n c h x f c e - 4 . 1 2 in repository xfce/xfce4-settings.
commit 35bc2c2db99e49d6624bb284b43b81a0bb682e40 Author: Florian Schüller <[email protected]> Date: Sat Feb 24 00:07:13 2018 +0100 Fixed screenshot in non-compositor mode Also a fallback if screenshot fails --- dialogs/accessibility-settings/find-cursor.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/dialogs/accessibility-settings/find-cursor.c b/dialogs/accessibility-settings/find-cursor.c index 79a6d1a..83bc45a 100644 --- a/dialogs/accessibility-settings/find-cursor.c +++ b/dialogs/accessibility-settings/find-cursor.c @@ -51,7 +51,7 @@ static GdkPixbuf *get_rectangle_screenshot (gint x, gint y, GtkWidget *widget) { GdkPixbuf *screenshot = NULL; - GdkWindow *root_window; + GdkWindow *root_window = gdk_get_default_root_window (); GdkColormap *colormap = gdk_colormap_get_system(); screenshot = @@ -124,10 +124,16 @@ find_cursor_window_expose (GtkWidget *widget, } else { /* only take a screenshot once in the first iteration */ - if (px == 1) - pixbuf = get_rectangle_screenshot (root_x + x - 250, root_y + y - 250, widget); - /* FIXME: use 0,0 as coordinates */ - gdk_cairo_set_source_pixbuf (cr, pixbuf, 1, 0); + if (px == 1) { + pixbuf = get_rectangle_screenshot (root_x + x - 250, root_y + y - 250, widget); + if (!pixbuf) + g_warning("Getting screenshot failed"); + } + + if (pixbuf) { + /* FIXME: use 0,0 as coordinates */ + gdk_cairo_set_source_pixbuf (cr, pixbuf, 1, 1); + } } cairo_paint (cr); -- To stop receiving notification emails like this one, please contact the administrator of this repository. _______________________________________________ Xfce4-commits mailing list [email protected] https://mail.xfce.org/mailman/listinfo/xfce4-commits
