Commit 2702a828 authored by Marco Trevisan's avatar Marco Trevisan 🎺

keyboard: Unset Idle ID before removing it

When toggling keyboard various times, we might get an error because trying to
disconnect an idle that isn't set anymore.

This is because when we remove the idle, we don't unset the ID.
Also clear the idle when destroying the keyboard.

parent 8ad33d87
......@@ -1144,6 +1144,7 @@ var Keyboard = class Keyboard {
if (this._focusNotifyId)
this._keyboard = null;; = null;
......@@ -1229,6 +1230,7 @@ var Keyboard = class Keyboard {
if (!this._showIdleId) {
this._showIdleId = GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {;
this._showIdleId = 0;
GLib.Source.set_name_by_id(this._showIdleId, '[gnome-shell]');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment