aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/main.vala7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/main.vala b/lib/main.vala
index c05d0164..b8f34599 100644
--- a/lib/main.vala
+++ b/lib/main.vala
@@ -607,9 +607,11 @@ public class Indicator.Keyboard.Service : Object {
}
window_sources = new Gee.HashMap<uint, Source> ();
+ ((!) window_stack).window_destroyed.connect (handle_window_destroyed);
((!) window_stack).focused_window_changed.connect (handle_focused_window_changed);
} else {
((!) window_stack).focused_window_changed.disconnect (handle_focused_window_changed);
+ ((!) window_stack).window_destroyed.disconnect (handle_window_destroyed);
window_sources = null;
}
}
@@ -622,6 +624,11 @@ public class Indicator.Keyboard.Service : Object {
}
[DBus (visible = false)]
+ private void handle_window_destroyed (uint window_id, string app_id) {
+ ((!) window_sources).unset (window_id);
+ }
+
+ [DBus (visible = false)]
private void handle_focused_window_changed (uint window_id, string app_id, uint stage) {
var sources = get_sources ();
var old_current = source_settings.get_uint ("current");