Add unredirect block / request hints



Hi,

Some apps like fullscreen 3D games don't really benefit from being
redirected by a
compositor but suffer a performance hit when being run under a
compositor. To deal
with that compositors do either (optionally) unredirect fullscreen
windows, disable
compositing completely when a fullscreen app is running, try to only
redirect specific
fullscreen windows or simply do not do anything at all and just pay the price.

Neither of the above is really ideal as unredirecting the "wrong"
window does have bad
side effects like possible flicker when opening popup windows or
tearing due to no
longer being vsynced by the compositor.

The compositor can not really know beforehand what the app is going to
do and whether
it benefits from being unredirected at all, the app on the other hand
should have enough
information to make this decision.

So I propose a new _NET_WM hint, that when set tells the compositor
"I do benefit from being unredirected and I promise to not do stupid
stuff while being unredirected".
Of course that should be just be a hint i.e the compositor is free to
ignore it and just redirect
the app anyway when it needs to for some reason (like recording video
using gnome-shell's
screencast recorder).

We would also need a hint to do the opposite i.e for apps to
explicitly say "I don't want to be unredirected".

The KDE people already implemented an opt-in implementation
https://projects.kde.org/projects/kde/kdelibs/repository/revisions/7cd28e48adfdc1fca2caf9c8453c209ddf0d5452

We should standardize this so that apps can work with that across
multiple WMs. I do plan to add support to
mutter once we standardized this.

Thanks,
Adel


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]