+2007-06-07 Tommi Komulainen <tommi.komulainen@nokia.com>
+
+ * src/hildon-window.c (hildon_window_window_state_event,
+ hildon_window_is_topmost_notify, hildon_window_class_init): Stop the
+ escape timeout on focus-out-event rather than notify::is-topmost; the
+ latter doesn't get called when menus pop up. Fixes: NB#52946, MB#1101
+
2007-06-07 Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
* src/hildon-window.c: Adding a patch from Tommi Komulainen to pass the
static gboolean
hildon_window_window_state_event (GtkWidget *widget,
GdkEventWindowState *event);
+static gboolean
+hildon_window_focus_out_event (GtkWidget *widget,
+ GdkEventFocus *event);
static void
hildon_window_notify (GObject *gobject,
widget_class->key_press_event = hildon_window_key_press_event;
widget_class->key_release_event = hildon_window_key_release_event;
widget_class->window_state_event = hildon_window_window_state_event;
+ widget_class->focus_out_event = hildon_window_focus_out_event;
/* now the object stuff */
object_class->finalize = hildon_window_finalize;
}
/*
+ * If the window lost focus while the user started to press the ESC key, we
+ * won't get the release event. We need to stop the timeout.
+ */
+static gboolean
+hildon_window_focus_out_event (GtkWidget *widget,
+ GdkEventFocus *event)
+{
+ HildonWindowPrivate *priv = HILDON_WINDOW_GET_PRIVATE (widget);
+
+ if (priv->escape_timeout)
+ {
+ g_source_remove (priv->escape_timeout);
+ priv->escape_timeout = 0;
+ }
+
+ return GTK_WIDGET_CLASS (parent_class)->focus_out_event (widget, event);
+}
+
+/*
* The menu popuping needs a menu popup-function
*/
static void
{
hildon_window_take_common_toolbar (window);
}
-
- else
- {
- /* If the window lost focus while the user started to press
- * the ESC key, we won't get the release event. We need to
- * stop the timeout*/
- if (priv->escape_timeout)
- {
- g_source_remove (priv->escape_timeout);
- priv->escape_timeout = 0;
- }
- }
}
/*