[Xfce4-commits] <midori:master> Ensure we have a window in _action_reload_stop_activate

Christian Dywan noreply at xfce.org
Sun Feb 26 00:04:08 CET 2012


Updating branch refs/heads/master
         to 61af41340712734c9ddc263d8ef33c2b264d26f3 (commit)
       from 7c7be5644d0b8a64c5e6d433b3bcefc9a05466e8 (commit)

commit 61af41340712734c9ddc263d8ef33c2b264d26f3
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Feb 26 00:02:59 2012 +0100

    Ensure we have a window in _action_reload_stop_activate

 midori/midori-browser.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 9d0689a..a121689 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -3284,13 +3284,14 @@ _action_reload_stop_activate (GtkAction*     action,
     {
         GdkModifierType state = (GdkModifierType)0;
         gint x, y;
+        GdkWindow* window;
         gboolean from_cache = TRUE;
 
         if (!strcmp (gtk_action_get_name (action), "ReloadUncached"))
             from_cache = FALSE;
-        else
+        else if ((window = gtk_widget_get_window (GTK_WIDGET (browser))))
         {
-            gdk_window_get_pointer (NULL, &x, &y, &state);
+            gdk_window_get_pointer (window, &x, &y, &state);
             if (state & GDK_SHIFT_MASK)
                 from_cache = FALSE;
         }


More information about the Xfce4-commits mailing list