mirror of
https://codeberg.org/waydeer/layer-shika.git
synced 2026-01-01 21:06:08 +00:00
fix: use roundtrip instead of blocking dispatch for initial events
This commit is contained in:
parent
91455060c7
commit
7a80655bfc
1 changed files with 6 additions and 1 deletions
|
|
@ -610,7 +610,12 @@ impl WaylandShellSystem {
|
||||||
info!("Starting WindowingSystem main loop");
|
info!("Starting WindowingSystem main loop");
|
||||||
|
|
||||||
info!("Processing initial Wayland configuration events");
|
info!("Processing initial Wayland configuration events");
|
||||||
while self.event_queue.blocking_dispatch(&mut self.state)? > 0 {
|
// first roundtrip to receive initial output, globals, and surface configure events
|
||||||
|
// second roundtrip handles any cascading configure events like fractional scaling and layer surface configures
|
||||||
|
for i in 0..2 {
|
||||||
|
let dispatched = self.event_queue.roundtrip(&mut self.state)?;
|
||||||
|
info!("Roundtrip {} dispatched {} events", i + 1, dispatched);
|
||||||
|
|
||||||
self.connection
|
self.connection
|
||||||
.flush()
|
.flush()
|
||||||
.map_err(|e| LayerShikaError::WaylandProtocol { source: e })?;
|
.map_err(|e| LayerShikaError::WaylandProtocol { source: e })?;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue