windowsNavigator: Adjust to get_key_focus() changes in Clutter
Clutter.Stage.get_key_focus() now always returns the value of
the Clutter.Stage.keyFocus property, whereas previously it
would return the stage itself when no explicit focus was set.
Adjust the code accordingly.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/561
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/395>
(cherry picked from commit e06b1e8236)
This commit is contained in:
committed by
Florian Müllner
parent
76e4dbae3f
commit
bf84e5d58f
@@ -173,7 +173,7 @@ export default class Extension {
|
||||
this._injectionManager.overrideMethod(viewProto, '_hideTooltips', () => {
|
||||
/* eslint-disable no-invalid-this */
|
||||
return function () {
|
||||
if (global.stage.get_key_focus() === global.stage)
|
||||
if (global.stage.get_key_focus() === null)
|
||||
global.stage.set_key_focus(this._prevFocusActor);
|
||||
this._pickWindow = false;
|
||||
for (let i = 0; i < this._workspaces.length; i++)
|
||||
@@ -235,7 +235,7 @@ export default class Extension {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (global.stage.get_key_focus() !== global.stage)
|
||||
if (global.stage.get_key_focus() !== null)
|
||||
return false;
|
||||
|
||||
// ignore shift presses, they're required to get numerals in azerty keyboards
|
||||
|
||||
Reference in New Issue
Block a user