From f2cca5cccb238b3cc3c4ac35a7905adee27595c3 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 24 Nov 2021 17:42:41 +0100 Subject: [PATCH] padOsd: Capture events on itself This actor is setting itself modal, should also stop listening to events from above it, since none will be gotten. Part-of: --- js/ui/padOsd.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js index 9804f9e30..9de5b4927 100644 --- a/js/ui/padOsd.js +++ b/js/ui/padOsd.js @@ -638,7 +638,6 @@ var PadOsd = GObject.registerClass({ this._settings = settings; this._imagePath = imagePath; this._editionMode = editionMode; - this._capturedEventId = global.stage.connect('captured-event', this._onCapturedEvent.bind(this)); this._padChooser = null; let seat = Clutter.get_default_backend().get_default_seat(); @@ -762,7 +761,7 @@ var PadOsd = GObject.registerClass({ this._padDiagram.updateLabels(this._getActionText.bind(this)); } - _onCapturedEvent(actor, event) { + vfunc_captured_event(event) { let isModeSwitch = (event.type() == Clutter.EventType.PAD_BUTTON_PRESS || event.type() == Clutter.EventType.PAD_BUTTON_RELEASE) && @@ -933,11 +932,6 @@ var PadOsd = GObject.registerClass({ this._deviceAddedId = 0; } - if (this._capturedEventId != 0) { - global.stage.disconnect(this._capturedEventId); - this._capturedEventId = 0; - } - this.emit('closed'); } });