|
|
@@ -837,6 +837,8 @@ impl WindowManager { |
| 837 |
837 |
&self.connection, |
| 838 |
838 |
&self.font, |
| 839 |
839 |
&self.config.keybindings, |
|
840 |
+ monitor.screen_x as i16, |
|
841 |
+ monitor.screen_y as i16, |
| 840 |
842 |
monitor.screen_width as u16, |
| 841 |
843 |
monitor.screen_height as u16, |
| 842 |
844 |
)?; |
|
|
@@ -2572,7 +2574,9 @@ impl WindowManager { |
| 2572 |
2574 |
use crate::keyboard::keysyms; |
| 2573 |
2575 |
if let Some(mapping) = &self.keyboard_mapping { |
| 2574 |
2576 |
let keysym = mapping.keycode_to_keysym(e.detail); |
| 2575 |
|
- if keysym == keysyms::XK_ESCAPE || keysym == keysyms::XK_Q { |
|
2577 |
+ let is_escape = keysym == keysyms::XK_ESCAPE; |
|
2578 |
+ let is_q = keysym == keysyms::XK_Q || keysym == 0x0051; |
|
2579 |
+ if is_escape || is_q { |
| 2576 |
2580 |
if let Err(error) = self.keybind_overlay.hide(&self.connection) { |
| 2577 |
2581 |
eprintln!("Failed to hide keybind overlay: {:?}", error); |
| 2578 |
2582 |
} |
|
|
@@ -2582,6 +2586,7 @@ impl WindowManager { |
| 2582 |
2586 |
return Ok(None); |
| 2583 |
2587 |
} |
| 2584 |
2588 |
Event::ButtonPress(ref e) if e.event == self.keybind_overlay.window() => { |
|
2589 |
+ self.connection.allow_events(Allow::REPLAY_POINTER, e.time)?; |
| 2585 |
2590 |
return Ok(None); |
| 2586 |
2591 |
} |
| 2587 |
2592 |
Event::Expose(ref expose_event) if expose_event.window == self.keybind_overlay.window() => { |
|
|
@@ -2768,6 +2773,12 @@ impl WindowManager { |
| 2768 |
2773 |
} |
| 2769 |
2774 |
} |
| 2770 |
2775 |
Event::ButtonPress(event) => { |
|
2776 |
+ if self.keybind_overlay.is_visible() && event.event != self.keybind_overlay.window() { |
|
2777 |
+ if let Err(error) = self.keybind_overlay.hide(&self.connection) { |
|
2778 |
+ eprintln!("Failed to hide keybind overlay: {:?}", error); |
|
2779 |
+ } |
|
2780 |
+ } |
|
2781 |
+ |
| 2771 |
2782 |
let is_bar_click = self |
| 2772 |
2783 |
.bars |
| 2773 |
2784 |
.iter() |