[gnome-screenshot] area-selection: abort area selection if a dimension is zero
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-screenshot] area-selection: abort area selection if a dimension is zero
- Date: Wed, 23 Jan 2013 15:43:37 +0000 (UTC)
commit 0bf1e8ae68169910270211c3cee76a243e292179
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Jan 23 10:42:45 2013 -0500
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
src/screenshot-area-selection.c | 5 ++++-
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]