Update smithay-client-toolkit version (#5)
* Update smithay-client-toolkit version * Fix formatting issues
This commit is contained in:
parent
18e49392ca
commit
817340fa14
3 changed files with 7 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ license = "MIT"
|
||||||
keywords = ["clipboard", "wayland"]
|
keywords = ["clipboard", "wayland"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
sctk = { package = "smithay-client-toolkit", version = "0.5" }
|
sctk = { package = "smithay-client-toolkit", version = "0.6.1" }
|
||||||
nix = "0.13.0"
|
nix = "0.13.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
//! Provides access to the wayland clipboard with only requirement being a WlDisplay
|
//! Provides access to the wayland clipboard with only requirement being a WlDisplay
|
||||||
//! object
|
//! object
|
||||||
//!
|
//!
|
||||||
//! ```no_run
|
//! ```norun
|
||||||
//! let (display, _) =
|
//! let (display, _) =
|
||||||
//! Display::connect_to_env().expect("Failed to connect to the wayland server.");
|
//! Display::connect_to_env().expect("Failed to connect to the wayland server.");
|
||||||
//! let mut clipboard = smithay_clipboard::WaylandClipboard::new(&display);
|
//! let mut clipboard = smithay_clipboard::WaylandClipboard::new(&display);
|
||||||
|
|
|
||||||
|
|
@ -118,9 +118,12 @@ impl ThreadedClipboard {
|
||||||
/// focus to work. Otherwise if no seat name is provided
|
/// focus to work. Otherwise if no seat name is provided
|
||||||
/// the name of the seat to last generate a key or pointer event
|
/// the name of the seat to last generate a key or pointer event
|
||||||
/// is used
|
/// is used
|
||||||
pub fn store(&mut self, seat_name: Option<String>, text: String) {
|
pub fn store<T>(&mut self, seat_name: Option<String>, text: T)
|
||||||
|
where
|
||||||
|
T: Into<String>,
|
||||||
|
{
|
||||||
self.request_send
|
self.request_send
|
||||||
.send(ThreadRequest::Store(seat_name, text))
|
.send(ThreadRequest::Store(seat_name, text.into()))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue