[gnome-utils] screenshot: don't segfault when taking a window picture with no delay
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-utils] screenshot: don't segfault when taking a window picture with no delay
- Date: Mon, 13 Jun 2011 20:20:43 +0000 (UTC)
commit 18a88aa628382382e5aa22bb45752e7bd0c0bfee
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Jun 13 16:17:13 2011 -0400
screenshot: don't segfault when taking a window picture with no delay
Add a timeout as a workaround.
https://bugzilla.gnome.org/show_bug.cgi?id=597435
gnome-screenshot/gnome-screenshot.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/gnome-screenshot/gnome-screenshot.c b/gnome-screenshot/gnome-screenshot.c
index 253dcb8..ac348aa 100644
--- a/gnome-screenshot/gnome-screenshot.c
+++ b/gnome-screenshot/gnome-screenshot.c
@@ -1432,8 +1432,17 @@ main (int argc, char *argv[])
}
else
{
- /* start this in an idle anyway and fire up the mainloop */
- g_idle_add (prepare_screenshot_timeout, NULL);
+ if (interactive_arg)
+ {
+ /* HACK: give time to the dialog to actually disappear.
+ * We don't have any way to tell when the compositor has finished
+ * re-drawing.
+ */
+ g_timeout_add (200,
+ prepare_screenshot_timeout, NULL);
+ }
+ else
+ g_idle_add (prepare_screenshot_timeout, NULL);
}
gtk_main ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]