diff --git a/Source/Editor/GUI/Docking/DockHintWindow.cs b/Source/Editor/GUI/Docking/DockHintWindow.cs index 8c3ea2ce7..8e0df04b7 100644 --- a/Source/Editor/GUI/Docking/DockHintWindow.cs +++ b/Source/Editor/GUI/Docking/DockHintWindow.cs @@ -111,7 +111,9 @@ namespace FlaxEditor.GUI.Docking window.DoDragDrop("", _dragOffset, window); } - + + window.IsAlwaysOnTop = true; + //window.Show(); //window.BringToFront(); //window.Focus(); @@ -119,8 +121,8 @@ namespace FlaxEditor.GUI.Docking // Perform layout again //windowGUI.PerformLayout(); - - + + // Start tracking mouse //Proxy.Window.StartTrackingMouse(false); } @@ -160,7 +162,11 @@ namespace FlaxEditor.GUI.Docking return; if (_toMove.Window != null) + { _toMove.Window.Window.Opacity = 1.0f; + _toMove.Window.Window.IsAlwaysOnTop = false; + _toMove.Window.Window.BringToFront(); + } // Check if window won't be docked if (_toSet == DockState.Float) diff --git a/Source/Engine/Platform/SDL/SDLPlatform.cpp b/Source/Engine/Platform/SDL/SDLPlatform.cpp index a39feaa95..a3952495a 100644 --- a/Source/Engine/Platform/SDL/SDLPlatform.cpp +++ b/Source/Engine/Platform/SDL/SDLPlatform.cpp @@ -304,12 +304,6 @@ void SDLPlatform::Tick() buttonUpEvent.motion.x = mousePosition.X; buttonUpEvent.motion.y = mousePosition.Y; draggedWindow->HandleEvent(buttonUpEvent); - //SDL_PushEvent(&buttonUpEvent); - - if (!draggedWindow->GetSettings().IsTopmost) - draggedWindow->SetIsAlwaysOnTop(false); - draggedWindow->BringToFront(); - draggedWindow = nullptr; } } diff --git a/Source/Engine/Platform/SDL/SDLWindow.cpp b/Source/Engine/Platform/SDL/SDLWindow.cpp index fd25a5836..e5c46f5ed 100644 --- a/Source/Engine/Platform/SDL/SDLWindow.cpp +++ b/Source/Engine/Platform/SDL/SDLWindow.cpp @@ -823,7 +823,7 @@ void SDLWindow::Show() else if (_settings.Parent == nullptr) BringToFront(); - // Reused top-most windows (DockHintWindow) doesn't stay on top for some reason + // Reused top-most windows doesn't stay on top for some reason if (_settings.IsTopmost && _settings.Type != WindowType::Tooltip) SetIsAlwaysOnTop(true); @@ -1345,7 +1345,6 @@ DragDropEffect SDLWindow::DoDragDrop(const StringView& data, const Float2& offse else #endif { - SetIsAlwaysOnTop(true); Show(); //draggingActive = true;