[gnome-shell] keyboard: Don't pop up on touch events
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] keyboard: Don't pop up on touch events
- Date: Tue, 16 Jan 2018 18:29:22 +0000 (UTC)
commit 705915cd31771d45eac63eb54b5ea952a95a9e2e
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Oct 9 12:53:04 2017 +0200
keyboard: Don't pop up on touch events
We want touch events to enable the keyboard and focus tracking, but
not to actually show it right away. Implement that behavior by only
changing the visibility of the keyboard when triggered by a GSettings
change.
https://bugzilla.gnome.org/show_bug.cgi?id=788188
js/ui/keyboard.js | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 771f23d..1a251b5 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -308,6 +308,7 @@ var Keyboard = new Lang.Class({
},
_syncEnabled: function () {
+ let wasEnabled = this._enableKeyboard;
this._enableKeyboard = this._a11yApplicationsSettings.get_boolean(SHOW_KEYBOARD);
this._enabled = this._enableKeyboard || this._lastDeviceIsTouchscreen();
if (!this._enabled && !this._keyboard)
@@ -315,14 +316,13 @@ var Keyboard = new Lang.Class({
this._setCaretTrackerEnabled(this._enabled);
- if (this._enabled) {
- if (!this._keyboard)
- this._setupKeyboard();
- else
- Main.layoutManager.showKeyboard();
- } else {
+ if (this._enabled && !this._keyboard)
+ this._setupKeyboard();
+
+ if (this._enableKeyboard && !wasEnabled)
+ Main.layoutManager.showKeyboard();
+ else if (!this._enableKeyboard && wasEnabled)
Main.layoutManager.hideKeyboard(true);
- }
},
_sync: function () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]