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.
This commit is contained in:
ManoloFLTK
2022-10-17 10:32:41 +02:00
parent 723d8caa9d
commit a944758aea
@@ -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);