fix: states

This commit is contained in:
Nova
2023-07-19 05:07:29 -07:00
parent eb2ace5d29
commit a85504a71a
2 changed files with 6 additions and 6 deletions

View File

@@ -479,16 +479,13 @@ impl PanelItem {
// info.states // info.states
// .into_iter() // .into_iter()
// .flat_map(|state| state.to_ne_bytes()) // .flat_map(|state| state.to_ne_bytes())
// .collect::<Vec<_>>(), // .collect(),
// ); // );
// } // }
xdg_toplevel.configure( xdg_toplevel.configure(
size.x as i32, size.x as i32,
size.y as i32, size.y as i32,
info.states info.states.into_iter().flat_map(u32::to_ne_bytes).collect(),
.into_iter()
.flat_map(|state| state.to_ne_bytes())
.collect::<Vec<_>>(),
); );
xdg_surface.configure(SERIAL_COUNTER.inc()); xdg_surface.configure(SERIAL_COUNTER.inc());
core_surface.flush_clients(); core_surface.flush_clients();

View File

@@ -260,6 +260,9 @@ impl Dispatch<XdgSurface, Mutex<XdgSurfaceData>, WaylandState> for WaylandState
0, 0,
if toplevel.version() >= 2 { if toplevel.version() >= 2 {
vec![5, 6, 7, 8] vec![5, 6, 7, 8]
.into_iter()
.flat_map(u32::to_ne_bytes)
.collect()
} else { } else {
vec![] vec![]
}, },
@@ -303,7 +306,7 @@ impl Dispatch<XdgSurface, Mutex<XdgSurfaceData>, WaylandState> for WaylandState
0, 0,
0, 0,
if toplevel.version() >= 2 { if toplevel.version() >= 2 {
vec![5, 6, 7, 8] vec![5, 6, 7, 8].into_iter().flat_map(u32::to_ne_bytes).collect()
} else { } else {
vec![] vec![]
}, },