Fix for issue #412 for the Wayland backend

The problem was that after a drag-n-drop within a window, text selection
by shift+arrow key stopped working.

Also, improves drag-n-drop within a window by leaving insertion point
at end of dragged text.
This commit is contained in:
ManoloFLTK 2022-11-23 09:33:41 +01:00
parent 0ba051994a
commit d215ddef81

View File

@ -115,7 +115,7 @@ static void data_source_handle_cancelled(void *data, struct wl_data_source *sour
save_cursor = NULL;
}
if (fl_dnd_target_window) {
Fl::handle(FL_DND_LEAVE, fl_dnd_target_window);
Fl::handle(FL_RELEASE, fl_dnd_target_window);
fl_dnd_target_window = 0;
}
Fl::pushed(0);
@ -454,7 +454,7 @@ static void data_device_handle_motion(void *data, struct wl_data_device *data_de
static void data_device_handle_leave(void *data, struct wl_data_device *data_device) {
//printf("Drag left our surface\n");
Fl::handle(FL_DND_LEAVE, fl_dnd_target_window);
if (current_drag_offer) Fl::handle(FL_DND_LEAVE, fl_dnd_target_window);
}