[Xfce4-commits] <xfce4-screenshooter:master> Fix crash with some WM (bug #8080).
Jérôme Guelfucci
noreply at xfce.org
Mon Jan 2 23:24:03 CET 2012
Updating branch refs/heads/master
to d99765f43d36af5edf60277f5043eb7ae9c97088 (commit)
from 14a5cffc30ef1538168c2a3ebebb24f0cbd74394 (commit)
commit d99765f43d36af5edf60277f5043eb7ae9c97088
Author: Bruno Ramos <brunoramos.lu at gmail.com>
Date: Mon Jan 2 23:20:09 2012 +0100
Fix crash with some WM (bug #8080).
lib/screenshooter-capture.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/lib/screenshooter-capture.c b/lib/screenshooter-capture.c
index 830d460..52f7b5c 100644
--- a/lib/screenshooter-capture.c
+++ b/lib/screenshooter-capture.c
@@ -381,6 +381,18 @@ static GdkPixbuf
rec_height += rectangle.y;
}
+ if (rec_x < 0)
+ {
+ rec_width = rec_width + rec_x;
+ rec_x = 0;
+ }
+
+ if (rec_y < 0)
+ {
+ rec_height = rec_height + rec_y;
+ rec_y = 0;
+ }
+
if (x_orig + rec_x + rec_width > gdk_screen_width ())
rec_width = gdk_screen_width () - x_orig - rec_x;
More information about the Xfce4-commits
mailing list