Preferred DragAction of DropTargets is ignored on X11
Steps to reproduce
- Open any Gtk4 example with an entry. For example the
- Insert some text in an entry. For example into the search entry of the
- Select some letters of the text and try dragging them around inside the entry.
- Do the above on Wayland and X11: Moving the letters works on Wayland while they are copied on X11.
- The behavior can be changed by holding down the modifiers Ctrl or Shift respectively, however the default behavior differs between X11 and Wayland.
As stated above, if no modifier is hold down during a drag operation inside an entry, the default drag action is copy on X11 and move on Wayland.
Both should behave in the same way; in the case of an entry, move (e.g. Wayland behavior) would be preferred.
- Ubuntu 21.04
masterbranch of Gtk @ 2e63b53b
graphene 1.10.7 Directories prefix : /usr/local libdir : lib/x86_64-linux-gnu includedir : include SIMD SSE : YES GCC vector : YES ARM NEON : NO Features GObject types : YES Introspection : NO Build Documentation : NO Tests : YES Installed tests: YES gtk 4.5.0 Display backends: wayland x11 Print backends : lpr file Media backends : gstreamer Features Vulkan support : False Cloud support : False Sysprof support : False Colord support : False Tracker support : False Build Debugging : True Optimization : 2 Introspection : False Documentation : False Man pages : False Tests : True Install tests : False Demos : True Examples : True Directories prefix : /usr/local includedir : /usr/local/include libdir : /usr/local/lib/x86_64-linux-gnu datadir : /usr/local/share Subprojects gi-docgen : NO python3 is missing modules: markdown, toml, typogrify graphene : YES mutest : YES pango : YES
This problem is not limited to GtkEntries, I can observe it also with GtkDropTargets on custom widgets. It seems, that the preferred GdkDragAction returned from the motion signal handler is somehow ignored on X11.
Can I provide any additional information which may be helpful?
Edit: Remove screenshots.
Edit2: Improve wording.