Another patch is attached (it uses cheat via QtTool flag instead QtWindowStaysOnTop) ... let me know if this one is what you want.

zeljko

Index: lcl/interfaces/qt/qtwsforms.pp
===================================================================
--- lcl/interfaces/qt/qtwsforms.pp	(revision 50082)
+++ lcl/interfaces/qt/qtwsforms.pp	(working copy)
@@ -556,19 +556,32 @@
       if AWinControl.HandleObjectShouldBeVisible and
         not (TCustomForm(AWinControl).FormStyle in fsAllStayOnTop) and
         not (fsModal in TCustomForm(AWinControl).FormState) and
+        (TCustomForm(AWinControl).FormStyle <> fsMDIChild) and
         (TCustomForm(AWinControl).PopupMode = pmAuto) and
         (TCustomForm(AWinControl).BorderStyle = bsNone) and
         (TCustomForm(AWinControl).PopupParent = nil) then
       begin
         W := QApplication_activeWindow;
-        if (W <> nil) and not QWidget_isModal(W) then
+        if (W <> nil) then
         begin
-          Flags := QWidget_windowFlags(W);
-          if (Flags and QtWindowStaysOnTopHint <> QtWindowStaysOnTopHint) and
-            GetAlwaysOnTopX11(W) then
+          if not QWidget_isModal(W) then
           begin
-            Flags := Widget.windowFlags;
-            Widget.setWindowFlags(Flags or QtWindowStaysOnTopHint);
+            Flags := QWidget_windowFlags(W);
+            if (Flags and QtWindowStaysOnTopHint <> QtWindowStaysOnTopHint) and
+              GetAlwaysOnTopX11(W) then
+            begin
+              Flags := Widget.windowFlags;
+              Widget.setWindowFlags(Flags or QtWindowStaysOnTopHint);
+            end;
+          end else
+          begin
+            Flags := QWidget_windowFlags(W);
+            if (Flags and QtWindowStaysOnTopHint <> QtWindowStaysOnTopHint) and
+              not GetAlwaysOnTopX11(W) then
+            begin
+              Flags := Widget.windowFlags;
+              Widget.setWindowFlags(Flags or QtTool);
+            end;
           end;
         end;
       end;
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to