|
|
@@ -89,8 +89,10 @@ impl WindowManager { |
| 89 |
89 |
u16::from(config.modkey).into(), |
| 90 |
90 |
)?; |
| 91 |
91 |
|
|
92 |
+ // TODO: identify error types |
| 92 |
93 |
let bar = Bar::new(&connection, &screen, screen_number, &config)?; |
| 93 |
94 |
|
|
95 |
+ // TODO: identify error types |
| 94 |
96 |
let selected_tags = Self::get_saved_selected_tags(&connection, root, config.tags.len())?; |
| 95 |
97 |
let gaps_enabled = config.gaps_enabled; |
| 96 |
98 |
|
|
|
@@ -111,6 +113,7 @@ impl WindowManager { |
| 111 |
113 |
bar, |
| 112 |
114 |
}; |
| 113 |
115 |
|
|
116 |
+ // TODO: identify error types |
| 114 |
117 |
window_manager.scan_existing_windows()?; |
| 115 |
118 |
window_manager.update_bar()?; |
| 116 |
119 |
|
|
|
@@ -179,6 +182,7 @@ impl WindowManager { |
| 179 |
182 |
} |
| 180 |
183 |
|
| 181 |
184 |
if attrs.map_state == MapState::VIEWABLE { |
|
185 |
+ // TODO: Identify errors |
| 182 |
186 |
let tag = self.get_saved_tag(window, net_client_info)?; |
| 183 |
187 |
self.windows.push(window); |
| 184 |
188 |
self.window_tags.insert(window, tag); |
|
|
@@ -203,6 +207,7 @@ impl WindowManager { |
| 203 |
207 |
.is_ok_and(|prop| !prop.value.is_empty()); |
| 204 |
208 |
|
| 205 |
209 |
if has_wm_class { |
|
210 |
+ // TODO: Identify errors |
| 206 |
211 |
let tag = self.get_saved_tag(window, net_client_info)?; |
| 207 |
212 |
self.windows.push(window); |
| 208 |
213 |
self.window_tags.insert(window, tag); |
|
|
@@ -211,9 +216,11 @@ impl WindowManager { |
| 211 |
216 |
} |
| 212 |
217 |
|
| 213 |
218 |
if let Some(&first) = self.windows.first() { |
|
219 |
+ // TODO: Identify errors |
| 214 |
220 |
self.set_focus(Some(first))?; |
| 215 |
221 |
} |
| 216 |
222 |
|
|
223 |
+ // TODO: Identify errors |
| 217 |
224 |
self.apply_layout()?; |
| 218 |
225 |
Ok(()) |
| 219 |
226 |
} |
|
|
@@ -295,10 +302,12 @@ impl WindowManager { |
| 295 |
302 |
pub fn run(&mut self) -> Result<bool> { |
| 296 |
303 |
println!("oxwm started on display {}", self.screen_number); |
| 297 |
304 |
|
|
305 |
+ // TODO: Identify errors |
| 298 |
306 |
keyboard::setup_keybinds(&self.connection, self.root, &self.config.keybindings)?; |
| 299 |
307 |
self.update_bar()?; |
| 300 |
308 |
|
| 301 |
309 |
loop { |
|
310 |
+ // TODO: Identify errors |
| 302 |
311 |
self.bar.update_blocks()?; |
| 303 |
312 |
|
| 304 |
313 |
if let Ok(Some(event)) = self.connection.poll_for_event() { |
|
|
@@ -322,6 +331,7 @@ impl WindowManager { |
| 322 |
331 |
|
| 323 |
332 |
self.connection.map_window(self.bar.window())?; |
| 324 |
333 |
|
|
334 |
+ // TODO: Identify errors |
| 325 |
335 |
self.apply_layout()?; |
| 326 |
336 |
self.update_focus_visuals()?; |
| 327 |
337 |
} else { |
|
|
@@ -356,6 +366,7 @@ impl WindowManager { |
| 356 |
366 |
} |
| 357 |
367 |
|
| 358 |
368 |
self.bar.invalidate(); |
|
369 |
+ // TODO: Identify errors |
| 359 |
370 |
self.bar |
| 360 |
371 |
.draw(&self.connection, self.selected_tags, occupied_tags)?; |
| 361 |
372 |
Ok(()) |
|
|
@@ -545,6 +556,7 @@ impl WindowManager { |
| 545 |
556 |
self.connection.flush()?; |
| 546 |
557 |
} |
| 547 |
558 |
|
|
559 |
+ // TODO: Indentify errors |
| 548 |
560 |
self.update_focus_visuals()?; |
| 549 |
561 |
Ok(()) |
| 550 |
562 |
} |