2009-03-25 Alberto Garcia <agarcia@igalia.com>
authorAlberto Garcia <agarcia@igalia.com>
Wed, 25 Mar 2009 18:45:47 +0000 (18:45 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Wed, 25 Mar 2009 18:45:47 +0000 (18:45 +0000)
Patch by Adam Endrodi (adam.endrodi@blumsoft.eu)

* src/hildon-program.c (hildon_program_update_top_most):
Update is-topmost when _MB_CURRENT_APP_WINDOW is 0

Fixes: NB#106998 (HildonProgram's is-topmost property doesn't
change when the user tasks in/out of an application)

ChangeLog
src/hildon-program.c

index bec5eac..7a4a9aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-03-25  Alberto Garcia  <agarcia@igalia.com>
+
+       Patch by Adam Endrodi (adam.endrodi@blumsoft.eu)
+
+       * src/hildon-program.c (hildon_program_update_top_most):
+       Update is-topmost when _MB_CURRENT_APP_WINDOW is 0
+
+       Fixes: NB#106998 (HildonProgram's is-topmost property doesn't
+       change when the user tasks in/out of an application)
+
 2009-03-25  Alejandro Pinheiro Iglesias <apinheiro@igalia.com>
 
        * configure.ac: added libcangerra-gtk dependency
index 4b76a4c..f45e49f 100644 (file)
@@ -335,7 +335,7 @@ hildon_program_window_list_is_is_topmost        (gpointer data,
 static void
 hildon_program_update_top_most                  (HildonProgram *program)
 {
-    XWMHints *wm_hints;
+    gboolean is_topmost;
     Window active_window;
     HildonProgramPrivate *priv;
 
@@ -343,11 +343,12 @@ hildon_program_update_top_most                  (HildonProgram *program)
     g_assert (priv);
     
     active_window = hildon_window_get_active_window();
+    is_topmost = FALSE;
 
     if (active_window)
     {
       gint xerror;
-      gboolean is_topmost = FALSE;
+      XWMHints *wm_hints;
       
       gdk_error_trap_push ();
       wm_hints = XGetWMHints (GDK_DISPLAY (), active_window);
@@ -360,13 +361,13 @@ hildon_program_update_top_most                  (HildonProgram *program)
         is_topmost = (wm_hints->window_group == priv->window_group);
         XFree (wm_hints);
       }
+    }
 
-      /* 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");
-      }
+    /* 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");
     }
 
     /* Check each window if it was is_topmost */