代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gnome-shell 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From ccc59673827f9e36b7374fcf03de94d1b1513550 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Mon, 22 Oct 2018 22:06:36 +0000
Subject: [PATCH] keyboardManager: Avoid idempotent calls to
meta_backend_set_keymap()
But still try to apply the keymap whenever the input sources changed. This
is a different approach to gnome-shell#240 that still avoid redundant
changes to the current keymap, but actually trigger one when input sources
are added.
https://bugzilla.redhat.com/show_bug.cgi?id=1637418
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/691
(cherry picked from commit b405ed64427a9d518d1714df678d04ad11267e15)
---
js/misc/keyboardManager.js | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/js/misc/keyboardManager.js b/js/misc/keyboardManager.js
index ae59f0014..f4001f130 100644
--- a/js/misc/keyboardManager.js
+++ b/js/misc/keyboardManager.js
@@ -52,11 +52,20 @@ var KeyboardManager = new Lang.Class({
this._current = null;
this._localeLayoutInfo = this._getLocaleLayout();
this._layoutInfos = {};
+ this._currentKeymap = null;
},
_applyLayoutGroup(group) {
let options = this._buildOptionsString();
let [layouts, variants] = this._buildGroupStrings(group);
+
+ if (this._currentKeymap &&
+ this._currentKeymap.layouts == layouts &&
+ this._currentKeymap.variants == variants &&
+ this._currentKeymap.options == options)
+ return;
+
+ this._currentKeymap = {layouts, variants, options};
Meta.get_backend().set_keymap(layouts, variants, options);
},
@@ -89,8 +98,6 @@ var KeyboardManager = new Lang.Class({
},
setUserLayouts(ids) {
- let currentId = this._current ? this._current.id : null;
- let currentGroupIndex = this._current ? this._current.groupIndex : null;
this._current = null;
this._layoutInfos = {};
@@ -117,9 +124,6 @@ var KeyboardManager = new Lang.Class({
info.group = group;
info.groupIndex = groupIndex;
- if (currentId == id && currentGroupIndex == groupIndex)
- this._current = info;
-
i += 1;
}
},
--
2.19.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。