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, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index e5ec003..6ac9dce 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,3 +1,5 @@
+//! A lightweight X11 window manager, inspired by dwm.
+
use atoms::InternedAtoms;
use clients::ClientState;
use colours::Colours;
@@ -12,6 +14,7 @@ use xcb::{
mod atoms;
mod clients;
mod colours;
+mod config;
mod cursors;
mod error;
mod focus;
@@ -93,6 +96,7 @@ impl WM<'_> {
/// Set the correct properties on the root window
fn setup_root(&mut self) -> Result<()> {
// TODO: Set EHWM properties on root window
+
self.conn
.check_request(self.conn.send_request_checked(&ChangeWindowAttributes {
window: self.root,
@@ -106,13 +110,14 @@ impl WM<'_> {
| x::EventMask::STRUCTURE_NOTIFY
| x::EventMask::PROPERTY_CHANGE,
),
- x::Cw::Cursor(self.cursors.normal),
+ x::Cw::Cursor(self.cursors.normal()),
],
}))?;
self.grab_keys()?;
// TODO: reset focus
+ self.unfocus();
Ok(())
}