[Xfce4-commits] [apps/xfce4-screenshooter] 01/01: Fix cursor capture when near screen edge (Bug #9262)
noreply at xfce.org
noreply at xfce.org
Mon Oct 7 00:02:58 CEST 2019
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-screenshooter.
commit ad25edbc533d27439e6a2c8bd71b1774be048fdb
Author: Andre Miranda <andreldm at xfce.org>
Date: Sun Oct 6 19:02:21 2019 -0300
Fix cursor capture when near screen edge (Bug #9262)
---
lib/screenshooter-capture.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/lib/screenshooter-capture.c b/lib/screenshooter-capture.c
index f37c143..0bc664d 100644
--- a/lib/screenshooter-capture.c
+++ b/lib/screenshooter-capture.c
@@ -430,15 +430,20 @@ static GdkPixbuf
&rectangle_cursor,
&rectangle_cursor))
{
+ int dest_x, dest_y;
+
TRACE ("Compose the two pixbufs");
+ dest_x = cursorx - rectangle_window.x - xhot;
+ dest_y = cursory - rectangle_window.y - yhot;
+
gdk_pixbuf_composite (cursor_pixbuf, screenshot,
- cursorx - rectangle_window.x - xhot,
- cursory - rectangle_window.y - yhot,
+ CLAMP (dest_x, 0, dest_x),
+ CLAMP (dest_y, 0, dest_y),
rectangle_cursor.width,
rectangle_cursor.height,
- cursorx - rectangle_window.x - xhot,
- cursory - rectangle_window.y - yhot,
+ dest_x,
+ dest_y,
1.0, 1.0,
GDK_INTERP_BILINEAR,
255);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list