status/keyboard: Only change the current source setting if it changed

This avoids all the work that goes on in various processes when
switching input sources if the activated source is the currently
configured one.

https://bugzilla.gnome.org/show_bug.cgi?id=691414
This commit is contained in:
Rui Matos 2013-01-09 02:01:59 +01:00
parent bcf294475f
commit ca44977d92

View File

@ -470,6 +470,8 @@ const InputSourceIndicator = new Lang.Class({
let is = new InputSource(type, id, displayName, shortName, i);
is.connect('activate', Lang.bind(this, function() {
if (this._currentSource.index == is.index)
return;
this._settings.set_value(KEY_CURRENT_INPUT_SOURCE,
GLib.Variant.new_uint32(is.index));
}));