| @@ -67,7 +67,6 @@ impl WindowManager { |
| 67 |
|
67 |
|
| 68 |
keyboard::setup_keybinds(&self.connection, self.root)?; |
68 |
keyboard::setup_keybinds(&self.connection, self.root)?; |
| 69 |
|
69 |
|
| 70 |
- // Initial bar draw |
|
|
| 71 |
self.update_bar()?; |
70 |
self.update_bar()?; |
| 72 |
|
71 |
|
| 73 |
loop { |
72 |
loop { |
| @@ -174,7 +173,7 @@ impl WindowManager { |
| 174 |
self.selected_tags = tag_mask(tag_index); |
173 |
self.selected_tags = tag_mask(tag_index); |
| 175 |
self.update_window_visibility()?; |
174 |
self.update_window_visibility()?; |
| 176 |
self.apply_layout()?; |
175 |
self.apply_layout()?; |
| 177 |
- self.update_bar()?; // Update bar to show new tag |
176 |
+ self.update_bar()?; |
| 178 |
|
177 |
|
| 179 |
let visible = self.visible_windows(); |
178 |
let visible = self.visible_windows(); |
| 180 |
self.set_focus(visible.first().copied())?; |
179 |
self.set_focus(visible.first().copied())?; |
| @@ -192,7 +191,7 @@ impl WindowManager { |
| 192 |
self.window_tags.insert(focused, mask); |
191 |
self.window_tags.insert(focused, mask); |
| 193 |
self.update_window_visibility()?; |
192 |
self.update_window_visibility()?; |
| 194 |
self.apply_layout()?; |
193 |
self.apply_layout()?; |
| 195 |
- self.update_bar()?; // Update bar to show occupied tags changed |
194 |
+ self.update_bar()?; |
| 196 |
} |
195 |
} |
| 197 |
|
196 |
|
| 198 |
Ok(()) |
197 |
Ok(()) |
| @@ -284,7 +283,6 @@ impl WindowManager { |
| 284 |
self.handle_key_action(action, arg)?; |
283 |
self.handle_key_action(action, arg)?; |
| 285 |
} |
284 |
} |
| 286 |
Event::ButtonPress(event) => { |
285 |
Event::ButtonPress(event) => { |
| 287 |
- // Check if click was on the bar |
|
|
| 288 |
if event.event == self.bar.window() { |
286 |
if event.event == self.bar.window() { |
| 289 |
if let Some(tag_index) = self.bar.handle_click(event.event_x) { |
287 |
if let Some(tag_index) = self.bar.handle_click(event.event_x) { |
| 290 |
self.view_tag(tag_index)?; |
288 |
self.view_tag(tag_index)?; |