diff libgui/src/octave-dock-widget.cc @ 25384:9b67c2294129

fix missing title bar highlighting when (un)docking a widget * octave-dock-widget.cc (make_window, make_widget): call set_style and focus if visible, always raise and activate
author Torsten <mttl@mailbox.org>
date Wed, 16 May 2018 21:14:09 +0200
parents f9ed57ecd3b4
children 75fef3484d12
line wrap: on
line diff
--- a/libgui/src/octave-dock-widget.cc	Tue May 15 18:09:04 2018 -0400
+++ b/libgui/src/octave-dock-widget.cc	Wed May 16 21:14:09 2018 +0200
@@ -280,18 +280,19 @@
       }
     else
       {
-        set_style (isActiveWindow ());
         disconnect (m_default_float_button, 0, this, 0);
         connect (m_default_float_button, SIGNAL (clicked (bool)),
                  this, SLOT (make_widget (bool)));
       }
 
+    raise ();
+    activateWindow ();
+
     if (vis)
     {
-      raise ();
       show ();
-      activateWindow ();
-      setFocus ();
+      focus ();
+      set_style (true);
     }
   }
 
@@ -325,20 +326,20 @@
       }
     else
       {
-        set_style (isActiveWindow ());
         disconnect (m_default_float_button, 0, this, 0);
         connect (m_default_float_button, SIGNAL (clicked (bool)),
                  this, SLOT (make_window (bool)));
       }
 
+    raise ();
+    QApplication::setActiveWindow (this);
+
     if (vis)
       {
         show ();
         focus ();
+        set_style (true);
       }
-
-     QApplication::setActiveWindow (this);
-
   }
 
   // dock the widget