mirror of
https://github.com/fltk/fltk.git
synced 2026-05-25 17:42:14 +08:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user