[gnome-shell] status/keyboard: Only change the current source setting if it changed



commit ca44977d92738dbcd03abfea05dff8a655bbf00f
Author: Rui Matos <tiagomatos gmail com>
Date:   Wed Jan 9 02:01:59 2013 +0100

    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

 js/ui/status/keyboard.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index c1b4ea1..590d2ee 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -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));
             }));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]