|
|
@@ -1,7 +1,7 @@ |
| 1 |
1 |
use crate::Config; |
| 2 |
2 |
use crate::bar::Bar; |
| 3 |
3 |
use crate::client::{Client, TagMask}; |
| 4 |
|
-use crate::errors::WmError; |
|
4 |
+use crate::errors::{ConfigError, WmError}; |
| 5 |
5 |
use crate::keyboard::{self, Arg, KeyAction, handlers}; |
| 6 |
6 |
use crate::layout::GapConfig; |
| 7 |
7 |
use crate::layout::tiling::TilingLayout; |
|
|
@@ -312,17 +312,18 @@ impl WindowManager { |
| 312 |
312 |
Ok(window_manager) |
| 313 |
313 |
} |
| 314 |
314 |
|
| 315 |
|
- pub fn show_startup_config_error(&mut self, error: &str) { |
|
315 |
+ pub fn show_startup_config_error(&mut self, error: ConfigError) { |
| 316 |
316 |
let monitor = &self.monitors[self.selected_monitor]; |
| 317 |
317 |
let monitor_x = monitor.screen_x as i16; |
| 318 |
318 |
let monitor_y = monitor.screen_y as i16; |
| 319 |
319 |
let screen_width = monitor.screen_width as u16; |
| 320 |
320 |
let screen_height = monitor.screen_height as u16; |
|
321 |
+ let error = format!("{error}"); |
| 321 |
322 |
|
| 322 |
323 |
if let Err(e) = self.overlay.show_error( |
| 323 |
324 |
&self.connection, |
| 324 |
325 |
&self.font, |
| 325 |
|
- error, |
|
326 |
+ error.as_str(), |
| 326 |
327 |
monitor_x, |
| 327 |
328 |
monitor_y, |
| 328 |
329 |
screen_width, |