Skip to content

Commit

Permalink
Windows: Fix fullscreen deadlock + release 0.17.1 (#622)
Browse files Browse the repository at this point in the history
* Windows: Fix fullscreen deadlock

* Release winit 0.17.1
  • Loading branch information
francesca64 committed Aug 7, 2018
1 parent 0955039 commit b2b740f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
@@ -1,6 +1,9 @@
# Unreleased

* On X11, prevent a compilation failure in release mode for versions of Rust greater than or equal to 1.30.
# Version 0.17.1 (2018-08-05)

- On X11, prevent a compilation failure in release mode for versions of Rust greater than or equal to 1.30.
- Fixed deadlock that broke fullscreen mode on Windows.

# Version 0.17.0 (2018-08-02)

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "winit"
version = "0.17.0"
version = "0.17.1"
authors = ["The winit contributors, Pierre Krieger <pierre.krieger1708@gmail.com>"]
description = "Cross-platform window creation library."
keywords = ["windowing"]
Expand Down
6 changes: 3 additions & 3 deletions src/platform/windows/window.rs
Expand Up @@ -276,8 +276,8 @@ impl Window {
if mem::replace(&mut window_state.resizable, resizable) != resizable {
// If we're in fullscreen, update stored configuration but don't apply anything.
if window_state.fullscreen.is_none() {
let mut style = unsafe {
winuser::GetWindowLongW(self.window.0, winuser::GWL_STYLE)
let mut style = unsafe {
winuser::GetWindowLongW(self.window.0, winuser::GWL_STYLE)
};

if resizable {
Expand Down Expand Up @@ -473,7 +473,7 @@ impl Window {
unsafe fn set_fullscreen_style(&self, window_state: &mut WindowState) -> (LONG, LONG) {
if window_state.fullscreen.is_none() || window_state.saved_window_info.is_none() {
let rect = util::get_window_rect(self.window.0).expect("`GetWindowRect` failed");
let dpi_factor = Some(self.get_hidpi_factor());
let dpi_factor = Some(window_state.dpi_factor);
window_state.saved_window_info = Some(events_loop::SavedWindowInfo {
style: winuser::GetWindowLongW(self.window.0, winuser::GWL_STYLE),
ex_style: winuser::GetWindowLongW(self.window.0, winuser::GWL_EXSTYLE),
Expand Down

0 comments on commit b2b740f

Please sign in to comment.