keyboard: Rename focusTracker "reset" signal to "window-grabbed"
What this signal does is fire when a window was grabbed. A receiver might want to do something special when a window was grabbed, whereas "reset" can mean anything. Rename the "reset" signal to "window-grabbed". Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1728>
This commit is contained in:
parent
91c4c43a7d
commit
cb68bbee36
@ -561,7 +561,7 @@ var FocusTracker = class {
|
|||||||
global.display.connect('grab-op-begin', (display, window, op) => {
|
global.display.connect('grab-op-begin', (display, window, op) => {
|
||||||
if (window == this._currentWindow &&
|
if (window == this._currentWindow &&
|
||||||
(op == Meta.GrabOp.MOVING || op == Meta.GrabOp.KEYBOARD_MOVING))
|
(op == Meta.GrabOp.MOVING || op == Meta.GrabOp.KEYBOARD_MOVING))
|
||||||
this.emit('reset');
|
this.emit('window-grabbed');
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Valid for wayland clients */
|
/* Valid for wayland clients */
|
||||||
@ -1255,7 +1255,7 @@ var Keyboard = GObject.registerClass({
|
|||||||
this._focusTracker = new FocusTracker();
|
this._focusTracker = new FocusTracker();
|
||||||
this._connectSignal(this._focusTracker, 'position-changed',
|
this._connectSignal(this._focusTracker, 'position-changed',
|
||||||
this._onFocusPositionChanged.bind(this));
|
this._onFocusPositionChanged.bind(this));
|
||||||
this._connectSignal(this._focusTracker, 'reset', () => {
|
this._connectSignal(this._focusTracker, 'window-grabbed', () => {
|
||||||
this._setFocusWindow(null);
|
this._setFocusWindow(null);
|
||||||
});
|
});
|
||||||
// Valid only for X11
|
// Valid only for X11
|
||||||
|
Loading…
Reference in New Issue
Block a user