/dev/twasilczyk/screenshot: f8e57179a70a: scrncap: fix starting ...
Tomasz Wasilczyk
twasilczyk at pidgin.im
Tue Apr 29 10:00:49 EDT 2014
Changeset: f8e57179a70a2cd55a0cc22d98247ce16834d007
Author: Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date: 2014-04-29 16:00 +0200
Branch: default
URL: https://hg.pidgin.im/dev/twasilczyk/screenshot/rev/f8e57179a70a
Description:
scrncap: fix starting selection from a hint
diffstat:
pidgin/plugins/screencap.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (29 lines):
diff --git a/pidgin/plugins/screencap.c b/pidgin/plugins/screencap.c
--- a/pidgin/plugins/screencap.c
+++ b/pidgin/plugins/screencap.c
@@ -221,8 +221,8 @@ scrncap_crop_window_btnpress(GtkWidget *
gtk_widget_set_size_request(selection, 0, 0);
gtk_widget_show_all(selection);
- crop_origin_x = event->x;
- crop_origin_y = event->y;
+ crop_origin_x = event->x_root;
+ crop_origin_y = event->y_root;
crop_active = TRUE;
return TRUE;
@@ -262,10 +262,10 @@ scrncap_crop_window_motion(GtkWidget *wi
"selection-preview");
cont = g_object_get_data(G_OBJECT(window), "cont");
- crop_x = MIN(crop_origin_x, event->x);
- crop_y = MIN(crop_origin_y, event->y);
- crop_w = abs(crop_origin_x - event->x);
- crop_h = abs(crop_origin_y - event->y);
+ crop_x = MIN(crop_origin_x, event->x_root);
+ crop_y = MIN(crop_origin_y, event->y_root);
+ crop_w = abs(crop_origin_x - event->x_root);
+ crop_h = abs(crop_origin_y - event->y_root);
crop_w = MAX(crop_w, 1);
crop_h = MAX(crop_h, 1);
More information about the Commits
mailing list