summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-11-23 09:33:41 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-11-23 09:33:41 +0100
commitd215ddef811aaf7f8452d866e9c67df35f836bd2 (patch)
tree4405f058337d9c4daf395a653de9b7cfd9a6f460
parent0ba051994a5b6a928db90a439461a37386e4d8e1 (diff)
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.
-rw-r--r--src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx b/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx
index 7ede42570..bd09c44cb 100644
--- a/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx
+++ b/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx
@@ -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);
}