summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
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