diff options
author | raveit65 <[email protected]> | 2013-10-22 21:00:48 +0200 |
---|---|---|
committer | Martin Wimpress <[email protected]> | 2014-01-02 11:37:24 +0000 |
commit | df499f89bec731829f6b9adcf7376b0689a4adb2 (patch) | |
tree | 4e64882c98fa1a2485401c0a43048b0d1a5595b2 | |
parent | aaea1a703050849cdf51170118189997920cda90 (diff) | |
download | mate-utils-df499f89bec731829f6b9adcf7376b0689a4adb2.tar.bz2 mate-utils-df499f89bec731829f6b9adcf7376b0689a4adb2.tar.xz |
screenshot: do not segfault when taking a window picture with no delay
-rw-r--r-- | mate-screenshot/mate-screenshot.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/mate-screenshot/mate-screenshot.c b/mate-screenshot/mate-screenshot.c index f3db5794..77ceb3af 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 (); |