mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2025-01-28 19:58:27 +01:00
Respect initial configure
This commit is contained in:
parent
39d5454a7f
commit
5744654cb1
1 changed files with 59 additions and 37 deletions
|
@ -92,9 +92,29 @@ impl XdgShellHandler for State {
|
|||
// TODO: fix it so that reordering this doesn't break stuff
|
||||
self.windows.push(window.clone());
|
||||
|
||||
if let Some(focused_output) = self.focus_state.focused_output.clone() {
|
||||
// FIXME: ignoring initial configure here
|
||||
self.update_windows(&focused_output);
|
||||
let win_clone = window.clone();
|
||||
self.schedule(
|
||||
move |_data| {
|
||||
if let WindowElement::Wayland(window) = &win_clone {
|
||||
let initial_configure_sent =
|
||||
compositor::with_states(window.toplevel().wl_surface(), |states| {
|
||||
states
|
||||
.data_map
|
||||
.get::<smithay::wayland::shell::xdg::XdgToplevelSurfaceData>()
|
||||
.expect("XdgToplevelSurfaceData wasn't in surface's data map")
|
||||
.lock()
|
||||
.expect("Failed to lock Mutex<XdgToplevelSurfaceData>")
|
||||
.initial_configure_sent
|
||||
});
|
||||
|
||||
initial_configure_sent
|
||||
} else {
|
||||
true
|
||||
}
|
||||
},
|
||||
|data| {
|
||||
if let Some(focused_output) = data.state.focus_state.focused_output.clone() {
|
||||
data.state.update_windows(&focused_output);
|
||||
BLOCKER_COUNTER.store(1, std::sync::atomic::Ordering::SeqCst);
|
||||
tracing::debug!(
|
||||
"blocker {}",
|
||||
|
@ -106,7 +126,7 @@ impl XdgShellHandler for State {
|
|||
}
|
||||
}
|
||||
let clone = window.clone();
|
||||
self.loop_handle.insert_idle(|data| {
|
||||
data.state.loop_handle.insert_idle(|data| {
|
||||
crate::state::schedule_on_commit(data, vec![clone], move |data| {
|
||||
BLOCKER_COUNTER.store(0, std::sync::atomic::Ordering::SeqCst);
|
||||
tracing::debug!(
|
||||
|
@ -124,7 +144,7 @@ impl XdgShellHandler for State {
|
|||
})
|
||||
});
|
||||
}
|
||||
self.loop_handle.insert_idle(move |data| {
|
||||
data.state.loop_handle.insert_idle(move |data| {
|
||||
data.state
|
||||
.seat
|
||||
.get_keyboard()
|
||||
|
@ -135,6 +155,8 @@ impl XdgShellHandler for State {
|
|||
SERIAL_COUNTER.next_serial(),
|
||||
);
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
fn toplevel_destroyed(&mut self, surface: ToplevelSurface) {
|
||||
|
|
Loading…
Add table
Reference in a new issue