diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2023-06-01 13:23:26 +0300 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2023-06-01 13:23:26 +0300 |
| commit | 84b8dfe8cd190de33221f465a7059be6a30769f5 (patch) | |
| tree | ab7b9e7b537858a5aa6376be6b8355c723f0fdec /src/state.rs | |
| parent | f11240cb1e30e494be840d2ecef8504dd8cea7ff (diff) | |
| download | i3bar-mango-84b8dfe8cd190de33221f465a7059be6a30769f5.tar.gz | |
small changes
Diffstat (limited to 'src/state.rs')
| -rw-r--r-- | src/state.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/state.rs b/src/state.rs index 6a1f701..23f8bea 100644 --- a/src/state.rs +++ b/src/state.rs @@ -14,7 +14,7 @@ use wayrs_utils::shm_alloc::ShmAlloc; use crate::{ bar::Bar, config::Config, i3bar_protocol::Block, pointer_btn::PointerBtn, - shared_state::SharedState, status_cmd::StatusCmd, wm_info_provider, + shared_state::SharedState, status_cmd::StatusCmd, }; pub struct State { @@ -85,7 +85,7 @@ impl State { config, status_cmd, blocks_cache: BlocksCache::default(), - wm_info_provider: wm_info_provider::bind_wayland(conn, globals, wm_info_cb), + wm_info_provider: WmInfoProvider::bind(conn, globals, wm_info_cb), }, cursor_theme, @@ -139,9 +139,7 @@ impl State { .bind_with_cb(conn, 2..=4, wl_output_cb) .expect("could not bind wl_output"); - if let Some(wm_info_provider) = &mut self.shared_state.wm_info_provider { - wm_info_provider.new_outut(conn, output); - } + self.shared_state.wm_info_provider.new_ouput(conn, output); let surface = self.wl_compositor.create_surface(conn); @@ -190,9 +188,9 @@ impl State { let bar = self.bars.swap_remove(bar_index); bar.surface.destroy(conn); bar.layer_surface.destroy(conn); - if let Some(wm_info_provider) = &mut self.shared_state.wm_info_provider { - wm_info_provider.output_removed(conn, bar.output); - } + self.shared_state + .wm_info_provider + .output_removed(conn, bar.output); if bar.output.version() >= 3 { bar.output.release(conn); } |
