Review of "Monitor Input Switch" version 1

Details Page Preview

Switch an external monitor's input source (HDMI / DP / USB-C) via ddcutil. Requires ddcutil to be installed and working.

Extension Homepage
https://github.com/nemofq/monitor-input-switch

No comments.

FAQ

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

  • extension.js:31
    this._itemsSection = new PopupMenu.PopupMenuSection()

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

  • extension.js:31
    this._itemsSection = new PopupMenu.PopupMenuSection()

EGO-L-004 warning

main loop sources should be removed in disable()

Main loop sources assigned in `enable()` are missing matching removals in `disable()` or its helper methods.

Remove main loop sources

  • extension.js:134
            this._scanTimeoutId = GLib.timeout_add(
                GLib.PRIORITY_DEFAULT, MONITORS_CHANGED_SETTLE_MS, () => {
                    this._scanTimeoutId = 0;
                    this._recheckTarget();
                    return GLib.SOURCE_REMOVE;
                })
  • extension.js:123
                this._startupTimeoutId = GLib.timeout_add(
                    GLib.PRIORITY_DEFAULT, MONITORS_CHANGED_SETTLE_MS, () => {
                        this._startupTimeoutId = 0;
                        this._scan();
                        return GLib.SOURCE_REMOVE;
                    })

All Versions

Version Status
1 Unreviewed