Review of "Force Quit" version 46

Details Page Preview

Adds a force quit button. Click the toolbar button, then choose the window you want to force quit. On accidental click, right click anywhere or press [Esc] to abort the kill.

Extension Homepage
https://github.com/meghprkh/force-quit/

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

Shexli (experimental) warning 3

Shexli found 3 issues that may need reviewer attention.

EGO-L-002 warning

objects created by extension should be destroyed in disable()

Objects assigned in `enable()` are missing matching `.destroy()` calls in `disable()` or its helper methods.

Destroy all objects

  • selection.js:67
            this._areaResolution = new St.Label({
                style_class: 'area-resolution',
                text: '',
            })
  • selection.js:56
            this._areaSelection = new St.Widget({
                name: 'area-selection',
                style_class: 'area-selection',
                visible: 'true',
                reactive: 'true',
                x: -10,
                y: -10,
            })

EGO-L-005 warning

owned object references should be released in disable()

Owned references that are cleaned up in `disable()` should also be released with `null` or `undefined`.

Destroy all objects

  • selection.js:67
            this._areaResolution = new St.Label({
                style_class: 'area-resolution',
                text: '',
            })
  • selection.js:56
            this._areaSelection = new St.Widget({
                name: 'area-selection',
                style_class: 'area-selection',
                visible: 'true',
                reactive: 'true',
                x: -10,
                y: -10,
            })

EGO-L-003 warning

signals connected by extension should be disconnected in disable()

Signals assigned in `enable()` are missing matching disconnect calls in `disable()` or its helper methods.

Disconnect all signals

  • extension.js:39
            this._clickGesture.connect('recognize', () => {
                this._selection = new Selection.SelectionWindow();
            })
  • selection.js:79
                this._signalCapturedEvent = this._areaSelection.connect(
                    'captured-event',
                    this._onCaptureEvent.bind(this)
                )

All Versions

Previous Reviews on this Version

megh posted a review
Its my understanding that classes wrapped in GObject.registerClass or ones that extend Signals.EvenetEmitter etc dont have a disable and hence cant the shexli errors are false positives. Please let me know if that is not the case. Some other shexli lints were fixed. Thanks
fmuellner active
"disable" in the context of the shexli warning means "when the extension is disabled". It doesn't look like that's happening, so strictly speaking the warnings aren't false positives. That said, it looks quite unlikely that this would be an issue in practice. The only case I can think of is when you click the "force quit" button, and then do nothing until the system goes idle - in that case, the extension is disabled when the screen is locked, but the grab/signal handlers/selection actors remain in place.