Very nice functionality, I like it.
Probably we should extend it to
* announce support in _NET_SUPPORTED
* add functionality to netwm/KWindowSystem
* bring it to NETWM spec (though I doubt we have success given that GNOME Shell and Unity require compositing all the time)
kwin/client.h
(Diff revision 1)
|
public: |
|
|
298 |
inline bool blocksCompositing() { return blocks_compositing; } |
maybe more Qt-style: isBlockingComposition()?
kwin/client.cpp
(Diff revision 1)
|
void Client::updateCursor() |
|
|
2114 |
void Client::updateCompositeBlocking(bool readProperty) |
|
|
2115 |
{ |
|
|
2116 |
const bool usedToBlock = blocks_compositing; |
|
|
2117 |
if (readProperty) { |
Why the bool readProperty? If I read the code correctly it's a no-op if readProperty is false
kwin/client.cpp
(Diff revision 1)
|
void Client::updateCursor() |
|
|
2124 |
blocks_compositing = rules()->checkBlockCompositing(prop_return != X::None); |
shouldn't the rules check be outside the if (readProperty) check?
- Martin
On March 20th, 2011, 3:11 p.m., Thomas Lübking wrote:
Review request for kwin.
By Thomas Lübking.
Updated March 20, 2011, 3:11 p.m.
Description
Allows windows (or users via the rule system) to block compositing while they're present.
The user still can resume and re-suspend compositing at any time (but if it has originally been suspended for a blocking client it will be resumed the moment the last blocking client disappears)
Outstanding issue is that the rules to not allow to apply by fullscreen mode.
No real idea how we should handle this (add to rules globally or do some rule specific)
|
Testing
Rule based & "xprop -f _KDE_NET_WM_BLOCK_COMPOSITING 32a -set _KDE_NET_WM_BLOCK_COMPOSITING 1"
No client internal property setting tested (so far) but it should work as well... ;-)
|
Diffs
- kwin/atoms.h (7d5752c)
- kwin/atoms.cpp (5e93b2a)
- kwin/client.h (0d479a0)
- kwin/client.cpp (ec60bde)
- kwin/composite.cpp (6783d32)
- kwin/events.cpp (05cf864)
- kwin/kcmkwin/kwinrules/ruleswidget.h (ca44bf2)
- kwin/kcmkwin/kwinrules/ruleswidget.cpp (f9fc407)
- kwin/kcmkwin/kwinrules/ruleswidgetbase.ui (74ac56b)
- kwin/manage.cpp (135a016)
- kwin/rules.h (87b2055)
- kwin/rules.cpp (9e4136a)
- kwin/workspace.h (3f6ad49)
- kwin/workspace.cpp (3c77511)
View Diff
|