summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2013-01-23 10:42:45 -0500
committerCosimo Cecchi <cosimoc@gnome.org>2013-01-23 10:42:45 -0500
commit0bf1e8ae68169910270211c3cee76a243e292179 (patch)
treedab7477564297e2c01caebc8c1c62dae88b9cc02
parent050bea90b850d8164e66624b18b1b838bc7176dc (diff)
downloadgnome-screenshot-0bf1e8ae68169910270211c3cee76a243e292179.tar.gz
area-selection: abort area selection if a dimension is zero
If a dimension of the rectangle we selected is zero, treat it as an aborted area selection. https://bugzilla.gnome.org/show_bug.cgi?id=692386
-rw-r--r--src/screenshot-area-selection.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/screenshot-area-selection.c b/src/screenshot-area-selection.c
index f81f282..cb7c986 100644
--- a/src/screenshot-area-selection.c
+++ b/src/screenshot-area-selection.c
@@ -115,7 +115,10 @@ select_area_button_release (GtkWidget *window,
data->rect.height = ABS (data->rect.y - event->y_root);
data->rect.x = MIN (data->rect.x, event->x_root);
data->rect.y = MIN (data->rect.y, event->y_root);
-
+
+ if (data->rect.width == 0 || data->rect.height == 0)
+ data->aborted = TRUE;
+
gtk_main_quit ();
return TRUE;