[effects/showpaint] Use a shortcut to toggle the effect
ClosedPublic

Authored by zzag on Sep 23 2018, 9:30 AM.

Details

Summary

The Show Paint effect is useful when debugging repaint regions issued by
effects. The only headache with it is necessity to enable/disable it.
Consider the following workflow:

  • Do some change to an effect;
  • Compile KWin (or the effect);
  • Go to System Settings and enable the Show Paint effect;
  • Test effect, check repaint regions, etc;
  • Disable the Show Paint effect;
  • Go to the step 1.

This workflow is really exhausting. Also, when testing repaints in a
nested compositor, things become quite messy.

Because purpose of this effect is to debug repaints (and because this
effect is not meant for daily usage), I think that's fine to change
how it's activated.

This patch improves the workflow by changing the way how this effect
gets activated. Instead of enabling/disabling it, one can just use a shortcut
to activate or deactivate the effect.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Sep 23 2018, 9:30 AM
Restricted Application added a project: KWin. · View Herald TranscriptSep 23 2018, 9:30 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Sep 23 2018, 9:30 AM
zzag edited the summary of this revision. (Show Details)Sep 23 2018, 9:35 AM
davidedmundson accepted this revision.Sep 28 2018, 8:17 AM
davidedmundson added a subscriber: davidedmundson.

Heh, given it's purely a dev tool I would have thought any user of it would just alias or set a custom shortcut on qdbus org.kde.KWin /Effects org.kde.kwin.Effects.toggleEffect showpaint
rather than the workflow you had above.

This revision is now accepted and ready to land.Sep 28 2018, 8:17 AM

Heh, given it's purely a dev tool I would have thought any user of it would just alias or set a custom shortcut on qdbus org.kde.KWin /Effects org.kde.kwin.Effects.toggleEffect showpaint rather than the workflow you had above.

Even I did exactly what Vlad did without thinking about using qdbus, so this seems a valid change to do xD

This revision was automatically updated to reflect the committed changes.