refactor(wayland): update to 0.30.0

This is pretty much a rewrite of the Wayland client code for `wayland-client` and `wayland-protocols` v0.30.0, and `smithay-client-toolkit` v0.17.0
This commit is contained in:
Jake Stanger
2023-04-29 22:08:02 +01:00
parent 5c18ec8ba0
commit 7f46cb4976
23 changed files with 1779 additions and 1338 deletions

View File

@@ -7,14 +7,15 @@ pub enum OpenState {
Open { focused: bool },
}
impl OpenState {
/// Creates from `SwayNode`
pub const fn from_toplevel(toplevel: &ToplevelInfo) -> Self {
impl From<&ToplevelInfo> for OpenState {
fn from(info: &ToplevelInfo) -> Self {
Self::Open {
focused: toplevel.active,
focused: info.focused,
}
}
}
impl OpenState {
/// Creates open with focused
pub const fn focused(focused: bool) -> Self {
Self::Open { focused }