summaryrefslogtreecommitdiff
path: root/mate-screenshot/mate-screenshot.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-10-25 07:09:00 -0700
committerStefano Karapetsas <[email protected]>2013-10-25 07:09:00 -0700
commit741849445cb427a9a31d3b3cb0f6f29357d5696a (patch)
tree10eb9416384158e8ab99de88f32cb1c521e742da /mate-screenshot/mate-screenshot.c
parent10b3b45e9e1484a372c676725264ba3427948319 (diff)
parent16b52af7ce208b7bac89ad04ae4ba4cf433103fd (diff)
downloadmate-utils-741849445cb427a9a31d3b3cb0f6f29357d5696a.tar.bz2
mate-utils-741849445cb427a9a31d3b3cb0f6f29357d5696a.tar.xz
Merge pull request #40 from NiceandGently/master
screenshot: do not segfault when taking a window picture with no delay
Diffstat (limited to 'mate-screenshot/mate-screenshot.c')
-rw-r--r--mate-screenshot/mate-screenshot.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/mate-screenshot/mate-screenshot.c b/mate-screenshot/mate-screenshot.c
index cd0ed540..63ec5d9b 100644
--- a/mate-screenshot/mate-screenshot.c
+++ b/mate-screenshot/mate-screenshot.c
@@ -1368,8 +1368,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 ();