Commit a7329431 authored by Florian Müllner's avatar Florian Müllner Committed by Marco Trevisan

altSwitcher: Fix error when all alternatives are disabled

While we do consider the case that we don't have a child to show for the
visibility, we are still trying to move the click action unconditionally.

#783

(cherry picked from commit e77463b8)
parent 5e7a7e31
......@@ -58,6 +58,9 @@ var AltSwitcher = new Lang.Class({
childToShow = this._standard;
} else if (this._alternate.visible) {
childToShow = this._alternate;
} else {
this.actor.hide();
return;
}
let childShown = this.actor.get_child();
......@@ -79,7 +82,7 @@ var AltSwitcher = new Lang.Class({
global.sync_pointer();
}
this.actor.visible = (childToShow != null);
this.actor.show();
},
_onDestroy() {
......
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