_drag refactor

This commit is contained in:
2025-01-21 16:08:09 +02:00
parent 61f04110a6
commit c22ae8fca7
3 changed files with 10 additions and 11 deletions

View File

@@ -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)

View File

@@ -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;
}
}

View File

@@ -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;