From a944758aea5fee68e0d6870c54d3b92d823e2b7f Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 17 Oct 2022 10:32:41 +0200 Subject: Wayland drag-n-drop to Fl_Window: send necessary FL_ENTER event (#516) Drag-n-drop under Wayland was OK in general except when the drop target is an Fl_Window because the belowmouse object is not set in this configuration. Processing an FL_ENTER event before the FL_DND_RELEASE event fixes that. --- src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'src/drivers') diff --git a/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx b/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx index 2dca84924..c80162b86 100644 --- a/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx +++ b/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx @@ -441,6 +441,7 @@ static void data_device_handle_leave(void *data, struct wl_data_device *data_dev static void data_device_handle_drop(void *data, struct wl_data_device *data_device) { if (!current_drag_offer) return; + Fl::handle(FL_ENTER, fl_dnd_target_window); // useful to set the belowmouse widget int ret = Fl::handle(FL_DND_RELEASE, fl_dnd_target_window); //printf("data_device_handle_drop ret=%d doing_dnd=%d\n", ret, doing_dnd); -- cgit v1.2.3