window: do not lose maximized/fullscreen -> default transitions on Wayland

Changing surface configuration flags *to* default would never be applied.
This was uncovered when implementing increment step resize: it would stop
working after *one* maximization.
This commit is contained in:
Greg V authored and Wez Furlong committed 2021-09-21 08:19:46 -07:00
1 parent c15f17b36b
commit c5da219847
1 file changed
+4 -6
+4 -6
View File
@@ -191,13 +191,11 @@ impl PendingEvent {
state,
states
);
match (self.window_state, state) {
(None, s) if s == WindowState::default() => {}
_ => {
self.window_state.replace(state);
changed = true;
}
if self.window_state.is_none() && state != WindowState::default() {
changed = true;
}
// Always set it to avoid losing non-default -> default transitions
self.window_state.replace(state);
changed
}
}