[gnome-screenshot] Present the existing window when activated in UI mode



commit 71f38351aad7835b55d17787d9f956170bb35e3d
Author: Kalev Lember <kalevlember gmail com>
Date:   Mon Sep 1 16:57:00 2014 +0200

    Present the existing window when activated in UI mode
    
    https://bugzilla.gnome.org/show_bug.cgi?id=735375

 src/screenshot-application.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/screenshot-application.c b/src/screenshot-application.c
index 452ffb9..cc11dc1 100644
--- a/src/screenshot-application.c
+++ b/src/screenshot-application.c
@@ -795,6 +795,15 @@ screenshot_application_startup (GApplication *app)
 static void
 screenshot_application_activate (GApplication *app)
 {
+  GtkWindow *window;
+
+  window = gtk_application_get_active_window (GTK_APPLICATION (app));
+  if (window != NULL)
+    {
+      gtk_window_present (GTK_WINDOW (window));
+      return;
+    }
+
   screenshot_config->interactive = TRUE;
   screenshot_show_interactive_dialog (SCREENSHOT_APPLICATION (app));
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]