From 3eae091ebb529ed418dec0f82ec16ee988e5129f Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 5 Apr 2009 11:28:42 +0200 Subject: [PATCH] Only print if the browser is visible --- midori/midori-browser.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 56fd4250..c60b4cda 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -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)); } -- 2.39.5