From f54d43fb7c9c0ed65f1021e31c3f03d8572460c3 Mon Sep 17 00:00:00 2001 From: MaxVerevkin Date: Mon, 20 Feb 2023 15:49:37 +0200 Subject: update dependencies --- src/state.rs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/state.rs') diff --git a/src/state.rs b/src/state.rs index 5a18a80..b9f11df 100644 --- a/src/state.rs +++ b/src/state.rs @@ -1,5 +1,4 @@ use crate::config::Position; -use crate::cursor::CursorTheme; use crate::protocol::*; use crate::wm_info_provider::*; @@ -8,7 +7,8 @@ use std::future::pending; use wayrs_client::connection::Connection; use wayrs_client::global::{Global, GlobalExt, Globals, GlobalsExt}; use wayrs_client::proxy::Proxy; -use wayrs_shm_alloc::{ShmAlloc, ShmAllocState}; +use wayrs_cursor::CursorTheme; +use wayrs_shm_alloc::ShmAlloc; use crate::{ bar::Bar, config::Config, i3bar_protocol::Block, pointer_btn::PointerBtn, @@ -57,9 +57,9 @@ impl State { conn.set_callback_for(conn.registry(), wl_registry_cb); - let shm = globals.bind(conn, 1..=1).expect("could not bind wl_shm"); + let wl_shm = globals.bind(conn, 1..=1).expect("could not bind wl_shm"); - let mut cursor_theme = CursorTheme::new(); + let mut cursor_theme = CursorTheme::new(None, None); let cursor_theme_ok = cursor_theme .ensure_cursor_is_loaded("default") .map_err(|e| error = Err(e.into())) @@ -75,7 +75,7 @@ impl State { bars: Vec::new(), shared_state: SharedState { - shm: ShmAlloc::new(conn, shm, 1024), + shm: ShmAlloc::new(wl_shm), config, status_cmd, blocks: Vec::new(), @@ -258,12 +258,6 @@ impl State { } } -impl ShmAllocState for State { - fn shm_alloc(&mut self) -> &mut ShmAlloc { - &mut self.shared_state.shm - } -} - fn wl_registry_cb( conn: &mut Connection, state: &mut State, @@ -455,10 +449,10 @@ fn wl_pointer_cb( cursor_theme .set_cursor( conn, + &mut state.shared_state.shm, "default", bar.scale, args.serial, - &mut state.shared_state.shm, seat.cursor_surface, pointer, ) -- cgit v1.3.1