Commit graph

12 commits

Author SHA1 Message Date
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
da2637af29
Fix crash when failing to write to a clipboard (#29)
Fix crash when failing to write to a clipboard
2020-10-13 15:25:36 +02:00
Kirill Chibisov
0577a468c3
Mark 'Clipboard::new' as 'unsafe'
Since this call takes raw pointer it's generally unsafe.
2020-09-30 19:13:15 +03:00
Kirill Chibisov
eef2ca9f2e Update SCTK to 0.12 2020-09-30 18:30:51 +03:00
Kirill Chibisov
8a81be7c0a
Avoid panic on dispatch failure (#23)
Prevent crash when calling unwrap on either sync_roundtrip
or dispatch_pending, and handle such case by replying downstream
that clipboard is dead.
2020-08-27 13:08:26 +02:00
Kirill Chibisov
2aea170962 Fix fd leak from keymap updates 2020-08-27 12:43:38 +02:00
Kirill Chibisov
d688c33f23 Advertise UTF8_STRING mimetype
Certain applications only accept UTF8_STRING mimetype like Geany
even so they are Wayland native.
2020-08-10 13:18:40 +02:00
Kirill Chibisov
597086c42c Add rustfmt.toml
Add rustfmt.toml that is being used by projects under smithay's
umbrella.
2020-08-06 09:38:46 +02:00
Kirill Chibisov
7fc533d55f Fix the crash when there's no focus on a seat
If the user asks for clipboard data with neither wl_keyboard
nor wl_pointer focus being presented on a seat, we should ignore the
request and reply with error, instead of crashing.
2020-08-05 22:37:54 +02:00
Kirill Chibisov
f4abc24f11 Fix clipboard not working when seat has empty name 2020-07-10 20:42:26 +02:00
Kirill Chibisov
bb652c775b
Update smithay-clipboard to SCTK 0.9.1 (#16)
This commit entirely reworks the internal structure of the entire crate,
as well as some of its APIs. This crate only accepts a C pointer to a
Wayland display object, since the target audience of this crate are
libraries without a wayland-client types. Also since seat information is
not presented in such clients most of the time, the clipboard entirely
relies on its seat tracking.
2020-05-10 15:40:03 +02:00