[gnome-shell] keyboard: Don't try to set the same current page twice
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] keyboard: Don't try to set the same current page twice
- Date: Thu, 9 May 2019 21:33:35 +0000 (UTC)
commit d84bbb877007ee460e1e99dbc00aa762c4aa2c4d
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Thu May 9 14:35:11 2019 -0500
keyboard: Don't try to set the same current page twice
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/540
js/ui/keyboard.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index a67d08f1e..64054208c 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1519,6 +1519,12 @@ var Keyboard = class Keyboard {
_setActiveLayer(activeLevel) {
let activeGroupName = this._keyboardController.getCurrentGroup();
let layers = this._groups[activeGroupName];
+ let currentPage = layers[activeLevel];
+
+ if (this._current_page == currentPage) {
+ this._updateCurrentPageVisible();
+ return;
+ }
if (this._current_page != null) {
this._setCurrentLevelLatched(this._current_page, false);
@@ -1527,7 +1533,7 @@ var Keyboard = class Keyboard {
delete this._current_page._destroyID;
}
- this._current_page = layers[activeLevel];
+ this._current_page = currentPage;
this._current_page._destroyID = this._current_page.connect('destroy', () => {
this._current_page = null;
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]