Commit 614bcf6d authored by Jehan's avatar Jehan

Bug 791352 - Screenshot delay is broken for region shots in GNOME.

Delay should indeed happen before root and window screenshots, but must
happen in-between region selection and region screenshot.

One can notice that the logics is different for Windows screenshot in
X11. The reason is that X11 window screenshot has an additional window
selection step (and therefore delay must happen in between selection and
actual screenshot). Window screenshot in Wayland doesn't have this step
and simply screenshots whatever is the currently active Window.
parent d9cd4b61
......@@ -87,14 +87,14 @@ screenshot_gnome_shell_shoot (ScreenshotValues *shootvals,
gint monitor = shootvals->monitor;
gboolean success;
if (shootvals->select_delay > 0)
screenshot_delay (shootvals->select_delay);
filename = gimp_temp_name ("png");
switch (shootvals->shoot_type)
{
case SHOOT_ROOT:
if (shootvals->select_delay > 0)
screenshot_delay (shootvals->select_delay);
method = "Screenshot";
args = g_variant_new ("(bbs)",
shootvals->show_cursor,
......@@ -134,9 +134,15 @@ screenshot_gnome_shell_shoot (ScreenshotValues *shootvals,
gdk_screen_get_monitor_at_point (screen,
(shootvals->x1 + shootvals->x2) / 2,
(shootvals->y1 + shootvals->y2) / 2);
if (shootvals->select_delay > 0)
screenshot_delay (shootvals->select_delay);
break;
case SHOOT_WINDOW:
if (shootvals->select_delay > 0)
screenshot_delay (shootvals->select_delay);
method = "ScreenshotWindow";
args = g_variant_new ("(bbbs)",
shootvals->decorate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment