** get_modal() method of window manager must only return the visible modal windows
authorSergio Villar Senin <svillar@igalia.com>
Tue, 2 Jun 2009 09:19:05 +0000 (11:19 +0200)
committerSergio Villar Senin <svillar@igalia.com>
Tue, 2 Jun 2009 09:19:05 +0000 (11:19 +0200)
* Fixes NB#120160, color selection dialog shown when trying to open another editor from an external application when the color has been changed in the body text of the already opened editor

src/hildon2/modest-hildon2-window-mgr.c

index 76a87f7..b4035c2 100644 (file)
@@ -893,7 +893,10 @@ modest_hildon2_window_mgr_get_modal (ModestWindowMgr *self)
                        break;
        }
 
-       return (GtkWindow *) toplevel;
+       if (toplevel && GTK_WIDGET_VISIBLE (toplevel) && gtk_window_get_modal ((GtkWindow *) toplevel))
+               return (GtkWindow *) toplevel;
+       else
+               return NULL;
 }