mirror of
https://github.com/servo/servo.git
synced 2025-10-01 00:59:15 +01:00
Bug: #22853 - Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False
Added patch for bug:22853 Added implementation to exit from fullscreen mode by pressing ESC button Added patch that supports to exit from fullscreen mode by pressing ESC Deleted patch files Added all requested changes on project Removed the loop over self.pending_changes in switch_fullscreen_mode function Bug #22853 - Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False Added missing bracket in constellation.rs file to fix build issue Bug: #22853 --> Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False
This commit is contained in:
parent
e27653ceae
commit
a8995fbf1a
8 changed files with 81 additions and 3 deletions
|
@ -159,7 +159,15 @@ impl Browser {
|
|||
}
|
||||
})
|
||||
.shortcut(Modifiers::empty(), Key::Escape, || {
|
||||
self.event_queue.push(WindowEvent::Quit);
|
||||
let state = self.window.get_fullscreen();
|
||||
if state {
|
||||
if let Some(id) = self.browser_id {
|
||||
let event = WindowEvent::ExitFullScreen(id);
|
||||
self.event_queue.push(event);
|
||||
}
|
||||
} else {
|
||||
self.event_queue.push(WindowEvent::Quit);
|
||||
}
|
||||
})
|
||||
.otherwise(|| self.platform_handle_key(key_event));
|
||||
}
|
||||
|
|
|
@ -329,7 +329,7 @@ impl Window {
|
|||
match self.kind {
|
||||
WindowKind::Window(ref window, ..) => {
|
||||
if self.fullscreen.get() != state {
|
||||
window.set_fullscreen(None);
|
||||
window.set_fullscreen(Some(window.get_primary_monitor()));
|
||||
}
|
||||
},
|
||||
WindowKind::Headless(..) => {},
|
||||
|
@ -337,6 +337,10 @@ impl Window {
|
|||
self.fullscreen.set(state);
|
||||
}
|
||||
|
||||
pub fn get_fullscreen(&self) -> bool {
|
||||
return self.fullscreen.get();
|
||||
}
|
||||
|
||||
fn is_animating(&self) -> bool {
|
||||
self.animation_state.get() == AnimationState::Animating && !self.suspended.get()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue