[gimp/gimp-2-8] Bug 630173 - a dockable open from an existing one appears under it



commit c4d14752a70cbcc18e57241748c7b3c3da8a250c
Author: Michael Natterer <mitch gimp org>
Date:   Wed May 9 00:20:06 2012 +0200

    Bug 630173 - a dockable open from an existing one appears under it
    
    Show the new dock with gtk_widget_show_now(), which waits until it's
    mapped, then call gdk_window_raise() explicitly. How sick...
    (cherry picked from commit bd3f892f7973a13e370b77898fe98b4c8be5e72c)

 app/widgets/gimpdialogfactory.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimpdialogfactory.c b/app/widgets/gimpdialogfactory.c
index ce057c2..46abf60 100644
--- a/app/widgets/gimpdialogfactory.c
+++ b/app/widgets/gimpdialogfactory.c
@@ -657,7 +657,14 @@ gimp_dialog_factory_dialog_new_internal (GimpDialogFactory *factory,
     }
 
   if (present && GTK_IS_WINDOW (toplevel))
-    gtk_window_present (GTK_WINDOW (toplevel));
+    {
+      /*  Work around focus-stealing protection, or whatever makes the
+       *  dock appear below the one where we clicked a button to open
+       *  it. See bug #630173.
+       */
+      gtk_widget_show_now (toplevel);
+      gdk_window_raise (gtk_widget_get_window (toplevel));
+    }
 
   return dialog;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]