Skip to content

Commit

Permalink
feat: implement toggle_fullscreen for Wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
aliaksandr-trush committed Aug 4, 2024
1 parent 56a27e9 commit f0a1bbc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions window/src/os/wayland/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,17 @@ impl WindowOps for WaylandWindow {
Ok(())
});
}

fn toggle_fullscreen(&self) {
WaylandConnection::with_window_inner(self.0, move |inner| {
if inner.window_state.contains(WindowState::FULL_SCREEN) {
inner.window.as_ref().unwrap().unset_fullscreen();
} else {
inner.window.as_ref().unwrap().set_fullscreen(None);
}
Ok(())
});
}
}
#[derive(Default, Clone, Debug)]
pub(crate) struct PendingEvent {
Expand Down

0 comments on commit f0a1bbc

Please sign in to comment.