[gnome-flashback/gnome-3-24] screenshot: fix cursor position



commit 6050ba57f9d1e0626358ced28c245cbdb71925d7
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Wed Mar 22 00:54:20 2017 +0200

    screenshot: fix cursor position
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780365

 gnome-flashback/libscreenshot/gf-screenshot.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnome-flashback/libscreenshot/gf-screenshot.c b/gnome-flashback/libscreenshot/gf-screenshot.c
index c087bfa..7f68b2b 100644
--- a/gnome-flashback/libscreenshot/gf-screenshot.c
+++ b/gnome-flashback/libscreenshot/gf-screenshot.c
@@ -826,8 +826,8 @@ take_screenshot_real (GfScreenshot    *screenshot,
           sscanf (gdk_pixbuf_get_option (cursor_pixbuf, "y_hot"), "%d", &yhot);
 
           /* in rect we have the cursor window coordinates */
-          rect.x = cx + real.x;
-          rect.y = cy + real.y;
+          rect.x = cx - xhot + real.x;
+          rect.y = cy - yhot + real.y;
           rect.width = gdk_pixbuf_get_width (cursor_pixbuf);
           rect.height = gdk_pixbuf_get_height (cursor_pixbuf);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]