Why things are the way they are

(or: Why isn’t my feature being implemented!)

Someone in the comments asked me to address the issue as to why we don’t yet have commonly requested functionality such as minimized window previews and input redirection. This post will address this and some of the solutions that we may have in the future.

Minimized window previews

This applies to a whole bunch of things. From the fact that we don’t have minimized taskbar thumbnails, showing minimized windows in scale, showing minimized previews in switchers instead of ugly icons etc etc etc.

The right way of doing things

The whole problem begins with the fact that there is no right way to handle minimized window previews. At best we could have something like this right now, in order from hacky to clean

  • #1 Snapshot the window and raster it to a texture before the window is minimized. This is what we used to do in Beryl for the window previews plugin:
    • Pros: Easy to implement, no need to mess with the window itself
    • Cons: No animated window thumbnails, takes up unecessary memory, causes lag when rastering large thumbnails
  • #2 Temporarily unminimize windows:
    • Pros: Easy, just tell all the windows to minimize
    • Cons: Severly messes with windows, lots of unecessary havoc going on as we unminimize a bunch of windows, lots of unecessary hacks in order to prevent animations etc etc etc
  • #3 Tell windows they are minimized, but really just animate their minimize, set the minimized hint, don’t display them and shape out their input
    • Pros: Window is always mapped, we always have it’s texture to draw, live thumbnails
    • Cons: Messes with windows, window thinks it’s minimized but it really isn’t so it might stop drawing or do erratic things
  • #4 Don’t tell windows they are minimized, animate their minimize, don’t display it and shape it’s input
    • Pros: Window acts as though it was still displaying, videos still play etc
    • Cons: Games etc would still expect input from the user, would not pause etc

You’re probably leaping to hit the comments button and say “But KWin and Mutter do #3 and #4!”. Yes they do, although it’s always been disabled by default in KWin.

The main problem comes with the fact that there is no way to tell a window to keep displaying but not expect any input.

There are a number of solutions but they require changes elsewhere:

  • #1 Have an input minimize event in X. This requires a _lot_ of work in the X Window System and might result in an ABI change – the last time that happened was when XI2 was introduced.
  • #2 Adjust EMWH to accoutn for this as KWin developer Lucas  Murray suggested to me

Both would provide a standard way of telling windows they have this particular state, so any application that doesn not behave as expected would simply be broken.

X Server Input Redirection

Yes, we’ve been waiting for years for this.

The good news is that all the code to do this is there. You can go compile an X Server and XComposite with input redirection right now if you want.

The problem is that it keeps on getting delayed. This is understandable since there are a lot of architectural changes going on in the X Server.

We probably need to push it harder though.

11 thoughts on “Why things are the way they are

  1. Nice post. Next time someone opens a bug for KWin to these topics I’ll link to this post🙂

    > Yes they do, although it’s been disabled by default in KWin now.
    It has always been disabled by default. But we added a hint in the user interface that it will break minimization of windows. And it really breaks applications – we have the bug reports for those😉

  2. Well, I’ve got the “always preview” option set in my Kwin, and TBH, I never bump into any minimization bugs😉 (or I have never noticed it)

    Guess you could implement this the way Kwin currently does, but disabled as default and optional for guys like me who don’t see any messing up windows.

  3. Our manufactures have paid close attention to the production and make sure they are up to standard to meet our Our site’s clients demanding requirements. As our handbags fit your budget as well as your taste, so why hesitate?
    The Louis Vuitton leather handbags Utah Leather is made of Utah Leather, louis vuitton epi leather the most classic design from Louis Vuitton,louis vuitton leather great price from our Louis Vuitton online store, hundreds of louis vuitton leather wallets, purses, wallets, city bags, clutches, luggage, pets carriers will be supplied.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s