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:
1 parent
c15f17b36b
commit
c5da219847
1 file changed
+4
-6
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user