Expose AbstractClient::setMaximize to scripting
ClosedPublic

Authored by strobach on Mar 25 2019, 3:54 PM.

Diff Detail

Repository
R108 KWin
Branch
script-maximize (branched from master)
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 10111
Build 10129: arc lint + arc unit
strobach created this revision.Mar 25 2019, 3:54 PM
Restricted Application added a project: KWin. · View Herald TranscriptMar 25 2019, 3:54 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
strobach requested review of this revision.Mar 25 2019, 3:54 PM
graesslin requested changes to this revision.Mar 25 2019, 4:18 PM
graesslin added a subscriber: graesslin.

Please don't randomly turn methods into slots. There's a fair chance of future breaking if somebody checks for the usage of the slot and notices it's unused.

If you want to make a method invokable by scripts: use Q_INVOKABLE.

This revision now requires changes to proceed.Mar 25 2019, 4:18 PM

OK, will do. I did honestly think that this is a bug.

strobach updated this revision to Diff 54782.Mar 25 2019, 4:34 PM
  • Use Q_INVOKABLE instead of slot
zzag added a subscriber: zzag.Mar 25 2019, 5:58 PM

Is it a good idea to expose AbstractClient::setMaximize anyway? As far as I know, xdg-shell doesn't define maximized vertically or maximized horizontally states.

As far as I know, xdg-shell doesn't define maximized vertically or maximized horizontally states.

XdgShell protocol does not define it as a state, but ShellClient still accepts this as a regular window move.

I don't see it being an issue.

Regardless of the XdgShell protocol, there's currently no way to maximize client from KWin script at all, which is somewhat limiting factor for certain use cases (e.g. Maximized layout in a tiling script such as https://github.com/faho/kwin-tiling).

davidedmundson accepted this revision.Mar 25 2019, 6:12 PM
graesslin accepted this revision.Mar 26 2019, 7:22 AM
This revision is now accepted and ready to land.Mar 26 2019, 7:22 AM
This revision was automatically updated to reflect the committed changes.