From 4e679c464982c9d197b54604bd32c1d16116aa09 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Wed, 22 Nov 2023 15:56:41 -0800 Subject: [PATCH] Fix wxDropSource::GiveFeedback() for Wayland "configure-event" does not occur for window movement with Wayland, so use event loop activity as a substitute. See #24051 --- src/gtk/dnd.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gtk/dnd.cpp b/src/gtk/dnd.cpp index a122c9ff8b..b5b64dd995 100644 --- a/src/gtk/dnd.cpp +++ b/src/gtk/dnd.cpp @@ -25,6 +25,7 @@ #include "wx/scopeguard.h" #include "wx/gtk/private/wrapgtk.h" +#include "wx/gtk/private/backend.h" //---------------------------------------------------------------------------- // global data @@ -914,8 +915,16 @@ wxDragResult wxDropSource::DoDragDrop(int flags) PrepareIcon( allowed_actions, context ); - while (m_waiting) + for (;;) + { gtk_main_iteration(); + if (!m_waiting) + break; +#ifdef __WXGTK3__ + if (!wxGTKImpl::IsX11(gtk_widget_get_display(m_iconWindow))) + GiveFeedback(ConvertFromGTK(gdk_drag_context_get_selected_action(context))); +#endif + } g_signal_handlers_disconnect_by_func (m_iconWindow, (gpointer) gtk_dnd_window_configure_callback, this);