fix: if the new configure matches, don't overwrite state with None
This commit is contained in:
parent
ec30b8004f
commit
6c9a2d4e9b
2 changed files with 4 additions and 6 deletions
|
|
@ -395,7 +395,7 @@ impl EventLoop {
|
||||||
app.window_event(&self.active_event_loop, window_id, event);
|
app.window_event(&self.active_event_loop, window_id, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if compositor_update.xdg_window_state.is_some() {
|
if compositor_update.xdg_window_state.take().is_some() {
|
||||||
let event = WindowEvent::WindowStateChanged;
|
let event = WindowEvent::WindowStateChanged;
|
||||||
app.window_event(&self.active_event_loop, window_id, event);
|
app.window_event(&self.active_event_loop, window_id, event);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -313,11 +313,9 @@ impl WindowHandler for WinitState {
|
||||||
self.window_compositor_updates[pos].suggested_bounds |= configure.suggested_bounds
|
self.window_compositor_updates[pos].suggested_bounds |= configure.suggested_bounds
|
||||||
!= winit_window.last_configure.as_ref().and_then(|last| last.suggested_bounds);
|
!= winit_window.last_configure.as_ref().and_then(|last| last.suggested_bounds);
|
||||||
|
|
||||||
self.window_compositor_updates[pos].xdg_window_state = winit_window
|
if winit_window.last_configure.as_ref().is_none_or(|last| last.state != configure.state) {
|
||||||
.last_configure
|
self.window_compositor_updates[pos].xdg_window_state = Some(configure.state);
|
||||||
.as_ref()
|
}
|
||||||
.is_none_or(|last| last.state != configure.state)
|
|
||||||
.then_some(configure.state);
|
|
||||||
|
|
||||||
self.window_compositor_updates[pos].resized |=
|
self.window_compositor_updates[pos].resized |=
|
||||||
winit_window.configure(configure, &self.shm, &self.subcompositor_state);
|
winit_window.configure(configure, &self.shm, &self.subcompositor_state);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue