mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
ibusCandidatePopup: Make pagination buttons clickable without stealing focus
The default StButton event handlers will create a temporary grab that will steal the keyboard focus out of the client, and cause it to pop down the candidates window. Avoid the default grabbing behavior, so that focus stays on the Wayland client while interacting with the ibusCandidatesPopup with the pointer. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2244 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2497>
This commit is contained in:
parent
943dae0735
commit
b05a95dffe
1 changed files with 18 additions and 2 deletions
|
|
@ -69,11 +69,27 @@ var CandidateArea = GObject.registerClass({
|
|||
|
||||
this.add(this._buttonBox);
|
||||
|
||||
this._previousButton.connect('clicked', () => {
|
||||
this._previousButton.connect('button-press-event', () => {
|
||||
this.emit('previous-page');
|
||||
return Clutter.EVENT_STOP;
|
||||
});
|
||||
this._nextButton.connect('clicked', () => {
|
||||
this._previousButton.connect('touch-event', (actor, event) => {
|
||||
if (event.type() === Clutter.EventType.TOUCH_BEGIN) {
|
||||
this.emit('previous-page');
|
||||
return Clutter.EVENT_STOP;
|
||||
}
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
});
|
||||
this._nextButton.connect('button-press-event', () => {
|
||||
this.emit('next-page');
|
||||
return Clutter.EVENT_STOP;
|
||||
});
|
||||
this._nextButton.connect('touch-event', (actor, event) => {
|
||||
if (event.type() === Clutter.EventType.TOUCH_BEGIN) {
|
||||
this.emit('next-page');
|
||||
return Clutter.EVENT_STOP;
|
||||
}
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
});
|
||||
|
||||
this._orientation = -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue