Discuss about a new KWin effect to manage windows and desktops
Open, Needs TriagePublic

Description

The purpose would be to discuss the possibility of creating a new KWin effect based mainly on QML but unifying the features of present windows and desktop grid effects.

The QML part of the new effect would be based on Parachute script (https://github.com/tcorreabr/Parachute).

Possible advantages:

  • One of the biggest problems with Parachute is the lack of smoothness of the animations. I already did a test that consisted in replacing the component responsible for draw the windows (KWin.ThumbnailItem) by a simple rectangle and as a result the animation became quite fluid. So replacing the QML component by the EffectWindow C++ class would solve this problem.
  • EffectWindow's allows to define stacking order. This would give a much better effect on animations and drag operations.
  • I am not sure but I think it would be possible to put QML components (labels, icons, buttons, etc.) on top of EffectWindow's. The component KWin.ThumbnailItem does not allow that.
  • Possibility to keep plasma panels visible. The windows created by KWin scripts do not allow this because they are necessarily "always on top" type.

Disadvantage:

  • Weird and difficult mix of QML and C++ code on UI. For example, how to support a drag of an EffectWindow in a QML container component?
tcorreabr renamed this task from Discuss about a new KWin effect for managing windows and desktops to Discuss about a new KWin effect to manage windows and desktops.May 30 2020, 11:31 PM
ngraham added a subscriber: ngraham.Jun 1 2020, 2:28 AM

I very strongly support unifying Present Windows and Desktop Grid, and I would like virtual desktop management in the style of Parachute too. One Effect To Rule Them All. :)

Right. And migrating the effects from C++ to QML can bring good results. Plasma itself shows that QML is great for building UI.

The question is define the best way to implement this. KWin script? KWin effect? Plasmoid?

On second thought, although I've only thought of one disadvantage, I think it outweighs all the advantages of switching from ThumbnailItem to EffectWindow. Mixing C++ and QML elements in the same UI would make everything a nice (even impractical) mess.

So maybe everything would be better if we solve ThumbnailItem performance issue and give it some stacking order support (through a new sendToFront method, for example?).

So while I'm not absolutely sure on this point, maybe the biggest benefit of migrating from script to effect (or maybe a plasmoid?) would be to avoid the limit of type of window allowed for scripts. Could this provide some integration with plasma panels and their plasmoids (like launchers)?