_wayland drag release fixed
Some checks are pending
Build Android / Game (Android, Release ARM64) (push) Waiting to run
Build iOS / Game (iOS, Release ARM64) (push) Waiting to run
Build Linux / Editor (Linux, Development x64) (push) Waiting to run
Build Linux / Game (Linux, Release x64) (push) Waiting to run
Build macOS / Editor (Mac, Development ARM64) (push) Waiting to run
Build macOS / Game (Mac, Release ARM64) (push) Waiting to run
Build Windows / Editor (Windows, Development x64) (push) Waiting to run
Build Windows / Game (Windows, Release x64) (push) Waiting to run
Cooker / Cook (Mac) (push) Waiting to run
Tests / Tests (Linux) (push) Waiting to run
Tests / Tests (Windows) (push) Waiting to run

This commit is contained in:
2025-01-28 03:16:09 +02:00
parent 982c03e061
commit 92bbfd9eeb
2 changed files with 4 additions and 7 deletions

View File

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

View File

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