Window switch notification for plasma applets

Andriy Rysin arysin at gmail.com
Thu Apr 14 19:52:20 BST 2011


Well, the keyboard daemon which stores layout per window map has no knowledge about indicator applets right now and I would like to keep it this way. Also second approach does not allow to store layout per applet. So I'll play with QGraphicsScene::focusItem() to see if it's not too ugly.

Thanks
Andriy

On Apr 14, 2011, at 12:39, "Aaron J. Seigo" <aseigo at kde.org> wrote:

> On Wednesday, April 13, 2011 20:31:01 Andriy Rysin wrote:
>> So the question is whether there's a way to
>> tell "active/focused" applet and get notified on switch?
> 
> not currently; well, at least not easily :)
> 
> QGraphicsScene does provide QGraphicsItem * QGraphicsScene::focusItem(), and 
> you could determine from that what has focus (by going up the object chain 
> until you hit a Plasma::Applet). that's rather ugly though :)
> 
> what might also work is to make the keyboard switcher accept keyboard focus 
> and then when the desktop window becomes active you can check if the switcher 
> has focus or not and decide on that. this raises the issue of multiple 
> keyboard switchers. using focusItem() might be easier.
> 
> -- 
> Aaron J. Seigo
> humru othro a kohnu se
> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
> 
> KDE core developer sponsored by Qt Development Frameworks




More information about the kde-core-devel mailing list