Review Request 108438: Use translucent/dialogs/background elements where possible

Aaron J. Seigo aseigo at kde.org
Mon Jan 21 12:17:43 UTC 2013


On Wednesday, January 16, 2013 20:22:56 Martin Gräßlin wrote:
> I will look into it tomorrow again - maybe Aaron found a solution for KWin
> tells libplasma that we use compositing ;-)

i don't think we can do anything sensible for libplasma1 ... 

what we need to be able to do is have the application register how to tell if 
compositing is active. in the common case this would use the selection as it 
does right now. but for kwin (e.g.) it would override this with its own 
tracking.

this can be done a few ways. one would be to create an interface class with a 
changed() signal and a bool compositing state property that can be registered 
to track compositing, e.g.:

Plasma::Theme::setWindowCompositingTracker(const WindowCompositingTracker 
*tracker)

only kwin (and similar) would ever need this. internally, a "standard" 
tracking object would be created and used. this would mean no changes to 
applications other than kwin.

this feels to me like someting that should live in libkwindowsystem. in which 
case, it could even be a single class used by application code (such as 
Plasma::Theme) that holds the implementation internally (so as the 
implementation changes, or even is deleted, it can fallback to the selection 
internally).

then Plasma::Theme and friends could drop all their own tracking of such 
things and just use that singleton, which kwin could then register its own 
tracking implementation with.

in fact, if there were other window system attributes other than compositing 
we wanted to be able to track, we could do them all in one place here. in any 
case, a draft API might look like:

CompositingState: a singleton QObject
	signal changed(bool isAvailable)
	property bool isAvailable
        write-only CompositingTracker * (internally: a QWeakPointer)

CompositingTracker:
	signal changed(bool isAvailable)
	property bool isAvailable	

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20130121/58d655b8/attachment.sig>


More information about the Plasma-devel mailing list