diff options
author | tcmal <me@aria.rip> | 2024-06-05 17:25:47 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-06-05 17:25:47 +0100 |
commit | 8b3f379c3b3216485d11787bcd63a56acd51ee58 (patch) | |
tree | c57364b1a9e6c4417987cda5f3d263f1682e9fce /src/main.rs | |
parent | 14e708041d32f2a2d3ceaf057181b4ae05ef851a (diff) |
add most keybind functionality (not yet running things)
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index f61f422..f99e19b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,7 @@ use atoms::InternedAtoms; use clients::ClientList; use cursors::Cursors; use error::*; +use keys::KeyboardState; use xcb::{ x::{self, ChangeWindowAttributes, PropertyNotifyEvent, Window}, Connection, Event, Extension, @@ -38,6 +39,7 @@ struct WM<'a> { cursors: Cursors, atoms: InternedAtoms, + keyboard_state: KeyboardState, } impl WM<'_> { @@ -62,6 +64,7 @@ impl WM<'_> { Ok(WM { atoms: InternedAtoms::new_with(conn)?, cursors: Cursors::new_with(conn)?, + keyboard_state: KeyboardState::new_with(conn)?, clients: Default::default(), conn, screen_num, @@ -69,7 +72,7 @@ impl WM<'_> { }) } - fn setup_root(&self) -> Result<()> { + fn setup_root(&mut self) -> Result<()> { // TODO: set wm properties self.conn .check_request(self.conn.send_request_checked(&ChangeWindowAttributes { @@ -89,7 +92,7 @@ impl WM<'_> { ], }))?; - self.grabkeys()?; + self.grab_keys()?; // TODO: reset focus |