summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-11-04 15:06:45 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-11-04 15:06:45 +0100
commit425bd5865d70fc751dd364ace701a8540cb2d352 (patch)
tree7be98eb579a32a024829f70ac54dc8053baa7caa
parentda96fa0ddfd605f5d726c14d18beb1b07b6b3e7b (diff)
Wayland DnD: make insertion cursor follow DnD cursor.
-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 b6470b3e8..38b7a1bb7 100644
--- a/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx
+++ b/src/drivers/Wayland/fl_wayland_clipboard_dnd.cxx
@@ -440,6 +440,7 @@ static void data_device_handle_motion(void *data, struct wl_data_device *data_de
Fl::e_x_root = Fl::e_x + fl_dnd_target_window->x();
Fl::e_y_root = Fl::e_y + fl_dnd_target_window->y();
ret = Fl::handle(FL_DND_DRAG, fl_dnd_target_window);
+ if (Fl::belowmouse()) Fl::belowmouse()->take_focus();
}
uint32_t supported_actions = ret && (Fl::pushed() || !doing_dnd) ? WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY : WL_DATA_DEVICE_MANAGER_DND_ACTION_NONE;
uint32_t preferred_action = supported_actions;