diff options
author | Xan Lopez <xan@gnome.org> | 2010-05-18 21:53:01 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2010-05-19 00:08:47 +0800 |
commit | 71ec9b46c22a8c5f6fa174aed77c54006e9089ea (patch) | |
tree | b559bc6a769c2a12a3c15991511c9b104acc4f07 /src/ephy-window.c | |
parent | 67a2d9af6414a981c02142ec195199b584b60a9d (diff) | |
download | gsoc2013-epiphany-71ec9b46c22a8c5f6fa174aed77c54006e9089ea.tar gsoc2013-epiphany-71ec9b46c22a8c5f6fa174aed77c54006e9089ea.tar.gz gsoc2013-epiphany-71ec9b46c22a8c5f6fa174aed77c54006e9089ea.tar.bz2 gsoc2013-epiphany-71ec9b46c22a8c5f6fa174aed77c54006e9089ea.tar.lz gsoc2013-epiphany-71ec9b46c22a8c5f6fa174aed77c54006e9089ea.tar.xz gsoc2013-epiphany-71ec9b46c22a8c5f6fa174aed77c54006e9089ea.tar.zst gsoc2013-epiphany-71ec9b46c22a8c5f6fa174aed77c54006e9089ea.zip |
Avoid ending up with stuck URL-entry statusbar messages
Turns out we can get two enter messages in a row followed by just one
leave message, which will make the statusbar get stuck with a message
forever. As a solution do not allow two enter messages to be processed
unless we have gone through the corresponding leave message.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r-- | src/ephy-window.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index b5d7434e8..d49b3f10b 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1255,7 +1255,11 @@ tool_item_enter_cb (GtkWidget *proxy, GdkEventCrossing *event, EphyWindow *window) { - if (event->mode == GDK_CROSSING_NORMAL) + gboolean repeated; + + repeated = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (proxy), "ephy-window-enter-event")); + + if (event->mode == GDK_CROSSING_NORMAL && repeated == FALSE) { GtkToolItem *item; GtkAction *action; @@ -1271,6 +1275,7 @@ tool_item_enter_cb (GtkWidget *proxy, { EphyWebView *view = ephy_window_get_active_web_view (window); ephy_web_view_statusbar_push (view, window->priv->help_message_cid, message); + g_object_set_data (G_OBJECT (proxy), "ephy-window-enter-event", GINT_TO_POINTER (TRUE)); g_free (message); } } @@ -1287,6 +1292,7 @@ tool_item_leave_cb (GtkWidget *proxy, { EphyWebView *view = ephy_window_get_active_web_view (window); ephy_web_view_statusbar_pop (view, window->priv->help_message_cid); + g_object_set_data (G_OBJECT (proxy), "ephy-window-enter-event", GINT_TO_POINTER (FALSE)); } return FALSE; |