+2009-01-23 Alberto Garcia <agarcia@igalia.com>
+
+ * src/hildon-program.c (hildon_program_update_top_most): Update
+ 'is-topmost' property also when wm_hints is not set.
+
+ Fixes: NB#98383 (is-topmost signal is not emitted when task
+ switcher is clicked.)
+
2009-01-23 Alejandro G. Castro <alex@igalia.com>
Patch contributed by: Artem Egorkine <ext-artem.egorkine@nokia.com>
if (active_window)
{
gint xerror;
+ gboolean is_topmost = FALSE;
gdk_error_trap_push ();
wm_hints = XGetWMHints (GDK_DISPLAY (), active_window);
if (wm_hints)
{
+ is_topmost = (wm_hints->window_group == priv->window_group);
+ XFree (wm_hints);
+ }
- if (wm_hints->window_group == priv->window_group)
- {
- if (!priv->is_topmost)
- {
- priv->is_topmost = TRUE;
- g_object_notify (G_OBJECT (program), "is-topmost");
- }
- }
- else if (priv->is_topmost)
- {
- priv->is_topmost = FALSE;
- g_object_notify (G_OBJECT (program), "is-topmost");
- }
+ /* Send notification if is_topmost has changed */
+ if (!priv->is_topmost != !is_topmost)
+ {
+ priv->is_topmost = is_topmost;
+ g_object_notify (G_OBJECT (program), "is-topmost");
}
- XFree (wm_hints);
}
/* Check each window if it was is_topmost */