Red Diff is Good Diff
A patch-set that removes more code than it adds is always much appreciated. Code that doesn’t exist cannot have bugs after all! KWin, our fantastic Wayland compositor and window manager, like many others, has an Alt+Tab switcher (“tabbox”) for quickly cycling between windows. Of course having been created by KDE, there’s plenty of options for how it should behave and what it should look like.

A while ago I noticed that the preview feature in System Settings stopped working for full-screen effects like “Flip Switch” (a Windows Vista-like pseudo-3D diagonal list of windows) and “Cover Switch“ (like the good old iTunes Cover Flow). The reason was that they set their Window type to “Popup” which normally makes sense but when loaded into the previewer helper program it had no parent window, so it refused to open. The previews also became increasingly outdated as they included various screenshots of applications.

What if we just made KWin do the preview?
This way it would also use the user’s current desktop wallpaper and whatever open windows there are, removing the need for a fake list and the infrastructure around it. Since you can actually configure a screen edge to trigger the window switcher, there clearly was already a way to bring it up programmatically without the user pressing Alt+Tab. All we needed to add was an interface for the settings module to show the switcher temporarily with the theme to be previewed.
As a result, I was able to remove around 700 lines of code from KWin’s vast code base as well as a Megabyte worth of screenshots. They will of course live on in git’s history but no longer have to be installed to the user’s hard drive.