Merge branch 'wip/focus-changes-during-grab-creation' into 'main'

Update to using clutter_grab_activate() for explicit grab activation

See merge request GNOME/gnome-shell!3330
This commit is contained in:
Carlos Garnacho 2024-06-28 22:44:21 +00:00
commit 816b3be621
6 changed files with 6 additions and 0 deletions

View file

@ -222,6 +222,7 @@ class _Draggable extends Signals.EventEmitter {
_grabDevice(actor, pointer, touchSequence) {
this._grab = global.stage.grab(actor);
this._grab.activate();
this._grabbedDevice = pointer;
this._touchSequence = touchSequence;
}

View file

@ -600,6 +600,7 @@ export const Inspector = GObject.registerClass({
eventHandler.connect('motion-event', this._onMotionEvent.bind(this));
this._grab = global.stage.grab(eventHandler);
this._grab.activate();
// this._target is the actor currently shown by the inspector.
// this._pointerTarget is the actor directly under the pointer.

View file

@ -679,6 +679,7 @@ export function pushModal(actor, params = {}) {
};
let grab = global.stage.grab(actor);
grab.activate();
if (modalCount === 0)
Meta.disable_unredirect_for_display(global.display);

View file

@ -500,6 +500,7 @@ const UIAreaSelector = GObject.registerClass({
if (this._dragButton) {
this._dragGrab = global.stage.grab(this);
this._dragGrab.activate();
this._dragSequence = sequence;
this.emit('drag-started');

View file

@ -91,6 +91,7 @@ export const Slider = GObject.registerClass({
let sequence = event.get_event_sequence();
this._grab = global.stage.grab(this);
this._grab.activate();
this._grabbedDevice = device;
this._grabbedSequence = sequence;

View file

@ -711,6 +711,7 @@ handle_button_press_event_cb (ClutterActor *actor,
stage = clutter_actor_get_stage (actor);
priv->grab = clutter_stage_grab (CLUTTER_STAGE (stage), priv->handle);
clutter_grab_activate (priv->grab);
priv->grab_device = device;
g_signal_emit (bar, signals[SCROLL_START], 0);