mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 13:20:06 -04:00
Merge branch 'evl2' into eventloop-2.0
This commit is contained in:
@@ -38,6 +38,7 @@ pub struct SharedState {
|
||||
pub guessed_dpi: Option<f64>,
|
||||
pub last_monitor: Option<X11MonitorHandle>,
|
||||
pub dpi_adjusted: Option<(f64, f64)>,
|
||||
pub fullscreen: Option<RootMonitorHandle>,
|
||||
// Used to restore position after exiting fullscreen.
|
||||
pub restore_position: Option<(i32, i32)>,
|
||||
pub frame_extents: Option<util::FrameExtentsHeuristic>,
|
||||
@@ -544,8 +545,14 @@ impl UnownedWindow {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_fullscreen(&self) -> Option<RootMonitorHandle> {
|
||||
self.shared_state.lock().fullscreen.clone()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_fullscreen(&self, monitor: Option<RootMonitorHandle>) {
|
||||
self.shared_state.lock().fullscreen = monitor.clone();
|
||||
self.set_fullscreen_inner(monitor)
|
||||
.flush()
|
||||
.expect("Failed to change window fullscreen state");
|
||||
|
||||
Reference in New Issue
Block a user