mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 05:10:03 -04:00
Merge branch 'evl2' into eventloop-2.0
This commit is contained in:
@@ -636,9 +636,15 @@ impl UnownedWindow {
|
||||
trace!("Unlocked shared state in `set_maximized`");
|
||||
}
|
||||
|
||||
// TODO: `set_fullscreen` is only usable if you fullscreen on the same
|
||||
// monitor the window's currently on.
|
||||
#[inline]
|
||||
pub fn get_fullscreen(&self) -> Option<RootMonitorHandle> {
|
||||
let shared_state_lock = self.shared_state.lock().unwrap();
|
||||
shared_state_lock.fullscreen.clone()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
/// TODO: Right now set_fullscreen do not work on switching monitors
|
||||
/// in fullscreen mode
|
||||
pub fn set_fullscreen(&self, monitor: Option<RootMonitorHandle>) {
|
||||
let shared_state_lock = self.shared_state.lock().unwrap();
|
||||
if shared_state_lock.is_simple_fullscreen {
|
||||
@@ -785,6 +791,12 @@ impl WindowExtMacOS for UnownedWindow {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn get_simple_fullscreen(&self) -> bool {
|
||||
let shared_state_lock = self.shared_state.lock().unwrap();
|
||||
shared_state_lock.is_simple_fullscreen
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn set_simple_fullscreen(&self, fullscreen: bool) -> bool {
|
||||
let mut shared_state_lock = self.shared_state.lock().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user