Jelajahi Sumber

Fix #9565

- Only bring window to front if it's on the currently active space
- Ensure correct order of child windows after fullscreen transition
Steven Kirk 2 tahun lalu
induk
melakukan
d00f19d556
1 mengubah file dengan 8 tambahan dan 1 penghapusan
  1. 8 1
      native/Avalonia.Native/src/OSX/WindowImpl.mm

+ 8 - 1
native/Avalonia.Native/src/OSX/WindowImpl.mm

@@ -137,7 +137,11 @@ void WindowImpl::BringToFront()
         
         for(auto iterator = _children.begin(); iterator != _children.end(); iterator++)
         {
-            (*iterator)->BringToFront();
+            auto window = (*iterator)->Window;
+            
+            // #9565: Only bring window to front if it's on the currently active space
+            if ([window isOnActiveSpace])
+                (*iterator)->BringToFront();
         }
     }
 }
@@ -161,6 +165,9 @@ void WindowImpl::StartStateTransition() {
 
 void WindowImpl::EndStateTransition() {
     _transitioningWindowState = false;
+    
+    // Ensure correct order of child windows after fullscreen transition.
+    BringToFront();
 }
 
 SystemDecorations WindowImpl::Decorations() {