-
Notifications
You must be signed in to change notification settings - Fork 950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows: Fix panic when calling set_fullscreen(None) #502
Conversation
Build and tested with Windows 7 (64bit) |
CHANGELOG.md
Outdated
@@ -16,6 +16,7 @@ | |||
- On X11, drag and drop now works reliably in release mode. | |||
- Added `WindowBuilderExt::with_resize_increments` and `WindowBuilderExt::with_base_size` to X11, allowing for more optional hints to be set. | |||
- Rework of the wayland backend, migrating it to use [Smithay's Client Toolkit](https://github.com/Smithay/client-toolkit). | |||
- Fix panic when trying to call `set_fullscreen(None)` on a window that has not been fullscreened prior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to specify which platform this is for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(...and don't forget to rebase.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops, my bad.
* Add condition to prevent panic Trying to call set_fullscreen(None) on a window that has never been in fullscreen mode caused a panic before this change. The responsible method now simply checks if this precondition is met and returns (does nothing) otherwise. * Add entry to CHANGELOG
Forgot to add that the to_fullscreen(None) bugfix is Windows only in CHANGELOG.
Alright, I still want @edwin0cheng to verify that this is good, but then we should be good to merge. Thanks for the contribution! |
Look good to me, and i tested it, it works properly, |
@edwin0cheng thanks! |
Fixes #501
This circumvents a panic when one calls set_fullscreen(None) on a window that has never been in fullscreen mode prior to calling that method.