Commit graph

13 commits

Author SHA1 Message Date
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
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
b88f48fbc0 Update sctk to 0.11.0 2020-08-30 18:37:23 +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
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
Kirill Chibisov
2971386aea Fix crash when receiving non-utf8 data
This commit also changes return type of `load` and `load_primary`
to propagate errors during reading and parsing clipboard contents.
2020-03-05 11:27:12 +03:00
Lucas Timmins
1fa455ab6f Refactor thread code into threaded.rs 2019-06-07 10:46:22 +08:00
Lucas Timmins
61ac558555 Take an option of a seat name or use name of latest seat event 2019-04-27 18:52:15 +08:00
trimental
a36d3e3e8e
Multiple seat support and api refactor (#2)
* Multiple seat support and api refractor

* Remove the need for two GlobalManagers

* Remove unnecessary `Arc<Mutex<_>>` and `if let`s with `unwrap()`

* Use cloned display to create eventloop in `new_threaded()`

* Update docs

* Wrap display to event queue
2019-02-13 23:48:50 +08:00
Lucas Timmins
198bedde23 Redraw screen when loading from clipboard in example 2019-02-11 21:05:39 +08:00
Lucas Timmins
0e959c7673 Rename to smithay-clipboard 2019-02-10 19:05:47 +08:00
Lucas Timmins
17011ea9f7 Initial commit 2019-02-10 01:28:53 +08:00