Fix window dragging when not supported by Wayland compositor
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
Some checks failed
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
This commit is contained in:
@@ -310,7 +310,7 @@ namespace WaylandImpl
|
|||||||
LOG(Warning, "wl_display_roundtrip_queue failed, errno: {}", errno);
|
LOG(Warning, "wl_display_roundtrip_queue failed, errno: {}", errno);
|
||||||
|
|
||||||
// Wait until window has showed up
|
// Wait until window has showed up
|
||||||
if (wrappedToplevel == nullptr && dragWindow && Platform::AtomicRead(&WaitFlag) != 0)
|
if (DragManager != nullptr && wrappedToplevel == nullptr && dragWindow && Platform::AtomicRead(&WaitFlag) != 0)
|
||||||
{
|
{
|
||||||
auto toplevel = static_cast<xdg_toplevel*>(SDL_GetPointerProperty(SDL_GetWindowProperties(draggedWindow), SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_POINTER, nullptr));
|
auto toplevel = static_cast<xdg_toplevel*>(SDL_GetPointerProperty(SDL_GetWindowProperties(draggedWindow), SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_POINTER, nullptr));
|
||||||
if (toplevel != nullptr)
|
if (toplevel != nullptr)
|
||||||
@@ -1431,7 +1431,11 @@ DragDropEffect SDLWindow::DoDragDrop(const StringView& data, const Float2& offse
|
|||||||
else
|
else
|
||||||
SDL_ShowWindow(_window);
|
SDL_ShowWindow(_window);
|
||||||
}
|
}
|
||||||
WindowBase::Show();
|
// Only show the window if toplevel dragging is supported
|
||||||
|
if (WaylandImpl::DragManager != nullptr)
|
||||||
|
WindowBase::Show();
|
||||||
|
else
|
||||||
|
Hide();
|
||||||
|
|
||||||
WaylandImpl::DraggingWindow = true;
|
WaylandImpl::DraggingWindow = true;
|
||||||
DoDragDropWayland(String(""), dragSourceWindow, dragOffset);
|
DoDragDropWayland(String(""), dragSourceWindow, dragOffset);
|
||||||
|
|||||||
Reference in New Issue
Block a user