mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
keyboard: Fix backspace not getting released after deleting preedit
When deleting is toggled while a preedit string is present, this causes _toggleDelete() to use keyvalPress(). After the entire preedit string has been deleted, _toggleDelete() will no longer hit the code path that would call keyvalRelease() due to hasPreedit() now being false. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7171 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3009>
This commit is contained in:
parent
3e7027821d
commit
4722dd0d32
1 changed files with 14 additions and 9 deletions
|
|
@ -1641,15 +1641,20 @@ export const Keyboard = GObject.registerClass({
|
|||
this._deleteEnabled = enabled;
|
||||
this._timesDeleted = 0;
|
||||
|
||||
if (!Main.inputMethod.currentFocus ||
|
||||
/* If there is no IM focus or are in the middle of preedit, fallback to
|
||||
* keypresses */
|
||||
if (enabled &&
|
||||
(!Main.inputMethod.currentFocus ||
|
||||
Main.inputMethod.hasPreedit() ||
|
||||
Main.inputMethod.terminalMode) {
|
||||
/* If there is no IM focus or are in the middle of preedit,
|
||||
* fallback to keypresses */
|
||||
if (enabled)
|
||||
Main.inputMethod.terminalMode)) {
|
||||
this._keyboardController.keyvalPress(Clutter.KEY_BackSpace);
|
||||
else
|
||||
this._backspacePressed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!enabled && this._backspacePressed) {
|
||||
this._keyboardController.keyvalRelease(Clutter.KEY_BackSpace);
|
||||
delete this._backspacePressed;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue