From 2e252279bb6f0c2418144e867dc05e2c167b1ac7 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 19 Jul 2023 05:07:29 -0700 Subject: [PATCH] fix: states --- src/wayland/panel_item.rs | 7 ++----- src/wayland/xdg_shell.rs | 5 ++++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wayland/panel_item.rs b/src/wayland/panel_item.rs index 104c5a9..6ac38ba 100644 --- a/src/wayland/panel_item.rs +++ b/src/wayland/panel_item.rs @@ -479,16 +479,13 @@ impl PanelItem { // info.states // .into_iter() // .flat_map(|state| state.to_ne_bytes()) - // .collect::>(), + // .collect(), // ); // } xdg_toplevel.configure( size.x as i32, size.y as i32, - info.states - .into_iter() - .flat_map(|state| state.to_ne_bytes()) - .collect::>(), + info.states.into_iter().flat_map(u32::to_ne_bytes).collect(), ); xdg_surface.configure(SERIAL_COUNTER.inc()); core_surface.flush_clients(); diff --git a/src/wayland/xdg_shell.rs b/src/wayland/xdg_shell.rs index 7eee842..82875b5 100644 --- a/src/wayland/xdg_shell.rs +++ b/src/wayland/xdg_shell.rs @@ -260,6 +260,9 @@ impl Dispatch, WaylandState> for WaylandState 0, if toplevel.version() >= 2 { vec![5, 6, 7, 8] + .into_iter() + .flat_map(u32::to_ne_bytes) + .collect() } else { vec![] }, @@ -303,7 +306,7 @@ impl Dispatch, WaylandState> for WaylandState 0, 0, if toplevel.version() >= 2 { - vec![5, 6, 7, 8] + vec![5, 6, 7, 8].into_iter().flat_map(u32::to_ne_bytes).collect() } else { vec![] },