Commit graph

86 commits

Author SHA1 Message Date
Ashley Wulber
5a3007def4 fix: always recalculate DnD rectangle on offer motion in case it changes
Sometimes DnD targets can be nested inside other containers which are also DnD targets.
2024-07-23 23:56:39 -04:00
Ashley Wulber
d099e82a4c fix: send selected action event 2024-06-12 14:35:21 -04:00
Ian Douglas Scott
ab1750a028 Update sctk to 0.19.1 2024-06-11 14:18:16 -07:00
Ashley Wulber
eefa50c3df
fix: remove a destination surface if it is assigned empty list of rectangles 2024-05-01 11:52:12 -04:00
Ashley Wulber
2263426a09
chore: add rwh-6 feature 2024-03-27 23:46:24 -04:00
Ashley Wulber
a698efe935
cleanup: fmt + clippy 2024-03-27 00:53:02 -04:00
Ashley Wulber
ace619fd01
refactor: add buffer variant to icon argument when starting DnD 2024-03-26 23:22:47 -04:00
Ashley Wulber
efe7a75e7b
refactor: Allow requesting a specific mime type when peeking at the offer 2024-03-26 17:13:38 -04:00
Ashley Wulber
1b6efd066e
refactor: make previous raw methods just allow specific mime types instead 2024-03-26 17:01:52 -04:00
Ashley Wulber
e84ab6d2d8
feat: method for peeking dnd offer data 2024-03-25 18:59:23 -04:00
Ashley Wulber
4c65853f51
cargo fmt 2024-03-25 16:43:11 -04:00
Ashley Wulber
e91be7dfc2
fix: rename Target import 2024-03-25 16:20:04 -04:00
Ashley Wulber
504d07cd83
chore: docs 2024-03-25 16:18:47 -04:00
Ashley Wulber
2c39b92611
chore: clippy 2024-03-25 16:18:47 -04:00
Ashley Wulber
cc9ab6de69
feat: dnd sources 2024-03-25 16:18:46 -04:00
Ashley Wulber
90dc61bb57
clippy 2024-03-25 16:18:45 -04:00
Ashley Wulber
f5384a32c0
chore: refactor dnd offer mimes 2024-03-25 16:18:44 -04:00
Ashley Wulber
1063256706
wip: dnd offer handling 2024-03-25 16:18:42 -04:00
Ashley Wulber
10e534c1be
wip: Dnd setup 2024-03-25 16:18:18 -04:00
Ashley Wulber
1879b30d49
feat: add conversion from string for MimeType 2024-03-25 16:18:16 -04:00
Ashley Wulber
cca54839a3
refactor: make MimeType::find_allowed pub(crate) 2024-03-25 16:17:16 -04:00
Ashley Wulber
9a0816b140
refactor: remove discriminant method 2024-03-25 16:04:12 -04:00
Ashley Wulber
f5908d028a
fix: reorder imports 2024-03-25 16:02:04 -04:00
Ashley Wulber
7db9746658
feat: add conversion from string for MimeType 2024-03-25 15:59:13 -04:00
Ashley Wulber
3118f11b03
feat: load raw clipboard data 2024-03-25 15:55:49 -04:00
Ashley Wulber
23ac0ffc5b
refactor: simplify trait bounds in the public interface 2024-03-25 15:55:48 -04:00
Ashley Wulber
50ccb2b60a
cleanup: more clearly document find_allowed 2024-03-25 15:55:47 -04:00
Ashley Wulber
b03e62069f
chore: document allowed mime types order preference 2024-03-25 15:55:47 -04:00
Ashley Wulber
7da622c80b
fix: check primary_selection_manager_state 2024-03-25 15:55:46 -04:00
Ashley Wulber
0d61c088e5
cleanup: add missing . to docs 2024-03-25 15:55:45 -04:00
Ashley Wulber
0043c35b92
cleanup: move local imports below mod * 2024-02-28 15:30:06 -05:00
Ashley Wulber
9341cc08e8
cleanup: prettier error handling 2024-02-28 15:27:26 -05:00
Ashley Wulber
4492880de3
cleanup: All private functions go bellow the public ones. 2024-02-28 15:20:43 -05:00
Ashley Wulber
a74fc5ba67
refactor: Text mimes as their own type 2024-02-28 15:17:37 -05:00
Ashley Wulber
84229d0503
reword some doc comments 2024-02-28 15:06:21 -05:00
Ashley Wulber
7a72dd39f0
fix: doc comment typos 2024-02-28 15:01:39 -05:00
Ashley Wulber
1d5e98d4ea
refactor: remove thiserror from dependencies 2024-02-28 14:59:34 -05:00
Ashley Wulber
87661a2611
chore: support 1.65 2024-02-27 18:01:11 -05:00
Ashley Wulber
56039608a0
chore: clippy 2024-02-27 17:54:18 -05:00
Ashley Wulber
3e56207b3a
feat: support custom mime types 2024-02-27 17:50:33 -05:00
Simon Hausmann
ee63d81a57
Fix panic when wayland display connection breaks
Instead, terminate the thread and consider the clipboard dead. The
application can now gracefully deal with the situation.

Closes: #52
2024-02-19 13:23:54 +04:00
Kirill Chibisov
909b7f6ff3
mime: use text/plain as a fallback 2023-10-10 21:07:27 +04:00
Kirill Chibisov
31392200dc
Update to SCTK 0.18.0
The main highlight is the move to calloop to handle all the requests
which makes it possible to remove all the active polling and clean the
data reading/writing, as well as accepting arbitrary long payloads.

This update also fixes the CI for the repository by moving it to github
actions, sets the minimum rust version, and edition to 2021.

Fixes #46.
Fixes #44.
Fixes #34.
2023-10-10 20:49:56 +04:00
Kirill Chibisov
f89b531897 Bump smithay-client-toolkit version to v0.16.0 2022-06-20 10:43:17 +02:00
Kirill Chibisov
f807e133c0 Bump 'smithay-client-toolkit' to v0.15
This also bumps 'wayland-rs' to 'v0.29'.
2021-08-14 10:54:59 +02:00
Benjamin Bouvier
fe44fead1c Bump smithay-client-toolkit to latest version 2021-06-25 15:59:32 +02:00
Christian Duerr
02f60b9884 Fix typo in normalize_to_lf function name
It took me a bit to figure out why I couldn't find this function when
searching for it in the repository. Turns out this time it wasn't me
spelled it wrong.
2021-02-24 20:42:07 +01:00
Christian Duerr
8ea0580829 Fix serial ID tracking
The serial ID tracking was incorrectly reinserting any previously used
seats without updating the serial information, leading to consecutive
clipboard stores being dropped by the compositor.

Fixes #33.
2021-02-04 11:01:01 +01:00
Kirill Chibisov
f6f5b98235
Fix segfault in multithreaded context
Dropping libwayland-client's queue in multithreaded context is safe if
and only if there're no alive proxies on it, otherwise it could result
in use-after-free. For more see [1] and [2].

[1] - https://gitlab.freedesktop.org/wayland/wayland/-/issues/13
[2] - https://github.com/Smithay/wayland-rs/issues/359
2020-12-12 18:28:29 +03:00
Kirill Chibisov
276aa84cf5
Fix comment about CRLF normalization 2020-11-12 19:05:17 +03:00