_drag refactor
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user