mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-07 08:21:02 -04:00
selection: implement support for drag-and-drop
We accept COPY and MOVE actions, for text/plain;charset=utf-8 mime-types. To implement DnD, we need to track the current DnD data offer *and* the terminal instance it is (currently) targeting. To do this, a seat has a new member, ‘dnd_term’. On a DnD enter event, we lookup the corresponding terminal instance and point ‘dnd_term’ to it. On a DnD leave event, ‘dnd_term’ is reset. The DnD data offer is tracked in the terminal’s wayland window instance. It is reset, along with the seat’s ‘dnd_term’ on a DnD leave event. On a drop event, we immediately clear the seat’s ‘dnd_term’, to ensure we don’t reset it, or destroy the offer before the drop has been completed. The drop’s ‘done()’ callback takes care of destroying and resetting the DnD offer in the terminal’s wayland window instance. Closes #175
This commit is contained in:
parent
af3b604d8e
commit
8e23b5b70d
3 changed files with 98 additions and 5 deletions
|
|
@ -45,6 +45,8 @@
|
|||
`foot.ini`. These options allow custom bold/italic fonts. They are
|
||||
unset by default, meaning the bold/italic version of the regular
|
||||
font is used (https://codeberg.org/dnkl/foot/issues/169).
|
||||
* Drag & drop support; text, files and URLs can now be dropped in a
|
||||
foot terminal window (https://codeberg.org/dnkl/foot/issues/175).
|
||||
|
||||
|
||||
### Changed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue