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
This commit is contained in:
Paul Cornett 2023-11-22 15:56:41 -08:00
parent 134e15f8f7
commit 4e679c4649

View file

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