|
|
@@ -329,13 +329,18 @@ impl WindowManager { |
| 329 |
329 |
Press Mod+Shift+/ to see keybinds\n\ |
| 330 |
330 |
Press Mod+Shift+R to reload after fixing your config"; |
| 331 |
331 |
|
| 332 |
|
- let screen_width = self.screen.width_in_pixels; |
| 333 |
|
- let screen_height = self.screen.height_in_pixels; |
|
332 |
+ let monitor = &self.monitors[self.selected_monitor]; |
|
333 |
+ let monitor_x = monitor.screen_x as i16; |
|
334 |
+ let monitor_y = monitor.screen_y as i16; |
|
335 |
+ let screen_width = monitor.screen_width as u16; |
|
336 |
+ let screen_height = monitor.screen_height as u16; |
| 334 |
337 |
|
| 335 |
338 |
if let Err(e) = self.overlay.show_error( |
| 336 |
339 |
&self.connection, |
| 337 |
340 |
&self.font, |
| 338 |
341 |
message, |
|
342 |
+ monitor_x, |
|
343 |
+ monitor_y, |
| 339 |
344 |
screen_width, |
| 340 |
345 |
screen_height, |
| 341 |
346 |
) { |
|
|
@@ -2961,12 +2966,17 @@ impl WindowManager { |
| 2961 |
2966 |
Err(err) => { |
| 2962 |
2967 |
eprintln!("Config reload error: {}", err); |
| 2963 |
2968 |
self.error_message = Some(err.clone()); |
| 2964 |
|
- let screen_width = self.screen.width_in_pixels; |
| 2965 |
|
- let screen_height = self.screen.height_in_pixels; |
|
2969 |
+ let monitor = &self.monitors[self.selected_monitor]; |
|
2970 |
+ let monitor_x = monitor.screen_x as i16; |
|
2971 |
+ let monitor_y = monitor.screen_y as i16; |
|
2972 |
+ let screen_width = monitor.screen_width as u16; |
|
2973 |
+ let screen_height = monitor.screen_height as u16; |
| 2966 |
2974 |
match self.overlay.show_error( |
| 2967 |
2975 |
&self.connection, |
| 2968 |
2976 |
&self.font, |
| 2969 |
2977 |
&err, |
|
2978 |
+ monitor_x, |
|
2979 |
+ monitor_y, |
| 2970 |
2980 |
screen_width, |
| 2971 |
2981 |
screen_height, |
| 2972 |
2982 |
) { |