summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-10-17 10:32:41 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-10-17 10:32:41 +0200
commita944758aea5fee68e0d6870c54d3b92d823e2b7f (patch)
tree263cfbe018064a3e2cd871e06904415c2638713c /src
parent723d8caa9d2a5acd423a354332f652ddfefb7d6e (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx1
1 files changed, 1 insertions, 0 deletions
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);