diff --git a/Source/Editor/GUI/Docking/WindowDragHelper.cs b/Source/Editor/GUI/Docking/WindowDragHelper.cs index f07d1f87d..06cbd06cd 100644 --- a/Source/Editor/GUI/Docking/WindowDragHelper.cs +++ b/Source/Editor/GUI/Docking/WindowDragHelper.cs @@ -432,10 +432,7 @@ namespace FlaxEditor.GUI.Docking private void OnUpdate() { var mousePos = Platform.MousePosition; - //needs to be commented out for X11, enabled for Wayland or Windows? - //if (_toMove.Window.Window.IsFocused) - // return; // Filter out mouse updates after dragging is over in dragged window - + if (_mouse != mousePos) OnMouseMove(mousePos); } @@ -443,7 +440,7 @@ namespace FlaxEditor.GUI.Docking private void OnMouseMove(Float2 mousePos) { if (_dragSourceWindow != null) - _toMove.Window.Window.Position = mousePos - _dragOffset; // Ignored on Wayland + _toMove.Window.Window.Position = mousePos - _dragOffset; UpdateRects(mousePos); } diff --git a/Source/Engine/Platform/SDL/SDLPlatform.Linux.cpp b/Source/Engine/Platform/SDL/SDLPlatform.Linux.cpp index 717962a81..35095b654 100644 --- a/Source/Engine/Platform/SDL/SDLPlatform.Linux.cpp +++ b/Source/Engine/Platform/SDL/SDLPlatform.Linux.cpp @@ -160,7 +160,6 @@ namespace WaylandImpl [](void* data, wl_data_device* data_device) // Leave event { // The cursor left the surface area - if (DataOffer != nullptr) wl_data_offer_destroy(DataOffer); DataOffer = nullptr; @@ -963,10 +962,11 @@ bool SDLWindow::HandleEventInternal(SDL_Event& event) break; } case SDL_EVENT_MOUSE_BUTTON_UP: + case SDL_EVENT_MOUSE_MOTION: { if (SDLPlatform::UsesWayland() && WaylandImpl::DraggingActive) { - // We are dragging a window, keep the button held down + // Ignore mouse events in dragged window return true; } break;