[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Window switch notification for plasma applets
From:       Andriy Rysin <arysin () gmail ! com>
Date:       2011-04-14 18:52:20
Message-ID: 54390FE4-7EF2-4A8A-A9DC-E0D2DD4F0F4F () gmail ! com
[Download RAW message or body]

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@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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic