[gnome-flashback/gnome-3-24] screenshot: destroy selection window earlier
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/gnome-3-24] screenshot: destroy selection window earlier
- Date: Wed, 3 May 2017 11:08:37 +0000 (UTC)
commit cf0685c6a81a96e654d9a7a14c97bab9699e72c5
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed May 3 14:05:31 2017 +0300
screenshot: destroy selection window earlier
https://bugzilla.gnome.org/show_bug.cgi?id=780358
gnome-flashback/libscreenshot/gf-screenshot.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gnome-flashback/libscreenshot/gf-screenshot.c b/gnome-flashback/libscreenshot/gf-screenshot.c
index ca18dfd..c031685 100644
--- a/gnome-flashback/libscreenshot/gf-screenshot.c
+++ b/gnome-flashback/libscreenshot/gf-screenshot.c
@@ -1165,11 +1165,15 @@ handle_select_area (GfDBusScreenshot *dbus_screenshot,
gint y;
gint width;
gint height;
+ gboolean selected;
select_area = gf_select_area_new ();
x = y = width = height = 0;
- if (gf_select_area_select (select_area, &x, &y, &width, &height))
+ selected = gf_select_area_select (select_area, &x, &y, &width, &height);
+ g_object_unref (select_area);
+
+ if (selected)
{
unscale_area (&x, &y, &width, &height);
gf_dbus_screenshot_complete_select_area (dbus_screenshot, invocation,
@@ -1182,8 +1186,6 @@ handle_select_area (GfDBusScreenshot *dbus_screenshot,
"Operation was cancelled");
}
- g_object_unref (select_area);
-
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]