Skip to content

Commit 0b9cf43

Browse files
authored
Merge pull request #1303 from pop-os/fix-applet-keypress
fix: check surface_ids for keypress
2 parents 704ff6a + 24b28a3 commit 0b9cf43

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/app.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2913,7 +2913,11 @@ impl Application for App {
29132913
}
29142914
}
29152915
Message::Key(window_id, modifiers, key, text) => {
2916-
if self.core.main_window_id() == Some(window_id) {
2916+
#[cfg(all(feature = "wayland", feature = "desktop-applet"))]
2917+
let in_surface_ids = self.surface_ids.values().any(|id| *id == window_id);
2918+
#[cfg(not(all(feature = "wayland", feature = "desktop-applet")))]
2919+
let in_surface_ids = false;
2920+
if self.core.main_window_id() == Some(window_id) || in_surface_ids {
29172921
let entity = self.tab_model.active();
29182922
for (key_bind, action) in self.key_binds.iter() {
29192923
if key_bind.matches(modifiers, &key) {

0 commit comments

Comments
 (0)