From 1861e3f34d187124337845365dd56e1ce94408d2 Mon Sep 17 00:00:00 2001 From: 56789a1987 <47248675+56789a1987@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:28:59 +0800 Subject: [PATCH] [x11] Fix drag & drop only accepts the first file on xwayland Observed on KDE Wayland, with Dolphin file manager. After dropping the first file, subsequent file drops will be rejected. --- os/x11/window.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/os/x11/window.cpp b/os/x11/window.cpp index f777d80c1..16b849a25 100644 --- a/os/x11/window.cpp +++ b/os/x11/window.cpp @@ -1317,7 +1317,6 @@ void WindowX11::processX11Event(XEvent& event) XFree(prop); } - const ::Window root = XDefaultRootWindow(m_display); XEvent event2; memset(&event2, 0, sizeof(event2)); event2.xany.type = ClientMessage; @@ -1329,7 +1328,7 @@ void WindowX11::processX11Event(XEvent& event) event2.xclient.data.l[1] = (successful ? 1 : 0); event2.xclient.data.l[2] = 0; event2.xclient.data.l[3] = 0; - XSendEvent(m_display, root, 0, 0, &event2); + XSendEvent(m_display, g_dndSource, 0, 0, &event2); } break;