status/keyboard: Always hide the old source panel indicator label
When we switch into an invalid input source we hide the panel indicator and return early but we were not hiding the previously active source label and its menu item dot and thus when switching again to a third input source we would end up showing 2 overlapping labels in the panel and the menu would have 2 entries with a dot. https://bugzilla.gnome.org/show_bug.cgi?id=695841
This commit is contained in:
parent
6119b44746
commit
5c89568cca
@ -416,6 +416,11 @@ const InputSourceIndicator = new Lang.Class({
|
||||
let oldSource;
|
||||
[oldSource, this._currentSource] = [this._currentSource, newSource];
|
||||
|
||||
if (oldSource) {
|
||||
oldSource.menuItem.setShowDot(false);
|
||||
oldSource.indicatorLabel.hide();
|
||||
}
|
||||
|
||||
if (!newSource || (nVisibleSources < 2 && !newSource.properties)) {
|
||||
// This source index might be invalid if we weren't able
|
||||
// to build a menu item for it, so we hide ourselves since
|
||||
@ -430,11 +435,6 @@ const InputSourceIndicator = new Lang.Class({
|
||||
|
||||
this.actor.show();
|
||||
|
||||
if (oldSource) {
|
||||
oldSource.menuItem.setShowDot(false);
|
||||
oldSource.indicatorLabel.hide();
|
||||
}
|
||||
|
||||
newSource.menuItem.setShowDot(true);
|
||||
newSource.indicatorLabel.show();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user