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
This commit is contained in:
parent
cf23490c37
commit
705915cd31
@ -308,6 +308,7 @@ var Keyboard = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_syncEnabled: function () {
|
_syncEnabled: function () {
|
||||||
|
let wasEnabled = this._enableKeyboard;
|
||||||
this._enableKeyboard = this._a11yApplicationsSettings.get_boolean(SHOW_KEYBOARD);
|
this._enableKeyboard = this._a11yApplicationsSettings.get_boolean(SHOW_KEYBOARD);
|
||||||
this._enabled = this._enableKeyboard || this._lastDeviceIsTouchscreen();
|
this._enabled = this._enableKeyboard || this._lastDeviceIsTouchscreen();
|
||||||
if (!this._enabled && !this._keyboard)
|
if (!this._enabled && !this._keyboard)
|
||||||
@ -315,14 +316,13 @@ var Keyboard = new Lang.Class({
|
|||||||
|
|
||||||
this._setCaretTrackerEnabled(this._enabled);
|
this._setCaretTrackerEnabled(this._enabled);
|
||||||
|
|
||||||
if (this._enabled) {
|
if (this._enabled && !this._keyboard)
|
||||||
if (!this._keyboard)
|
|
||||||
this._setupKeyboard();
|
this._setupKeyboard();
|
||||||
else
|
|
||||||
|
if (this._enableKeyboard && !wasEnabled)
|
||||||
Main.layoutManager.showKeyboard();
|
Main.layoutManager.showKeyboard();
|
||||||
} else {
|
else if (!this._enableKeyboard && wasEnabled)
|
||||||
Main.layoutManager.hideKeyboard(true);
|
Main.layoutManager.hideKeyboard(true);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_sync: function () {
|
_sync: function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user