Auto merge of #24249 - ferjm:exit.fullscreen, r=paulrouget

Go back to original window size after exiting fullscreen

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #24200

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24249)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-09-20 13:03:51 -04:00 committed by GitHub
commit 9c91984de1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -325,7 +325,7 @@ impl WindowPortsMethods for Window {
fn set_fullscreen(&self, state: bool) {
if self.fullscreen.get() != state {
self.gl_context.borrow_mut().window()
.set_fullscreen(Some(self.primary_monitor.clone()));
.set_fullscreen(if state { Some(self.primary_monitor.clone()) } else { None });
}
self.fullscreen.set(state);
}