From: Christian Dywan Date: Sun, 5 Apr 2009 09:28:42 +0000 (+0200) Subject: Only print if the browser is visible X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3eae091ebb529ed418dec0f82ec16ee988e5129f;p=midori Only print if the browser is visible --- 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)); }