]> spindle.queued.net Git - midori/commitdiff
Only print if the browser is visible
authorChristian Dywan <christian@twotoasts.de>
Sun, 5 Apr 2009 09:28:42 +0000 (11:28 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 5 Apr 2009 09:28:42 +0000 (11:28 +0200)
midori/midori-browser.c

index 56fd4250d0d6a189823f7a4066e9a5a1c85a69cf..c60b4cdac9596274d4fa625d5cfcefa33661d1e2 100644 (file)
@@ -1605,8 +1605,12 @@ static void
 _action_print_activate (GtkAction*     action,
                         MidoriBrowser* browser)
 {
-    GtkWidget* view = midori_browser_get_current_tab (browser);
-    if (view)
+    GtkWidget* view;
+
+    if (!GTK_WIDGET_VISIBLE (browser))
+        return;
+
+    if ((view = midori_browser_get_current_tab (browser)))
         midori_view_print (MIDORI_VIEW (view));
 }