[Panel-devel] Plasma::PushButton behaviour

Jason Stubbs jasonbstubbs at gmail.com
Sat Nov 17 09:29:07 CET 2007


On Friday 16 November 2007 01:41:20 Jason Stubbs wrote:
> On Thursday 15 November 2007 04:33:38 Aaron J. Seigo wrote:
> > On Wednesday 14 November 2007, Jason Stubbs wrote:
> > > I've also discovered that this still doesn't fix the problem
> > > completely. After giving focus to the system tray by clicking on it, a
> > > click on a toolbox button will generate a mousePressEvent but no
> > > subsequent mouseMoveEvents or mouseReleaseEvent. This happens with or
> > > without my patch.
> > >
> > > I can't see anything in the Qt documentation to explain the above.
> > > Perhaps a Qt bug?
> >
> > could be =/
>
> I think the real issue is that the
> WindowDeactivate is occuring at all. Somewhere during the above events,
> kwin is also doing something although I'm not sure if it's related:
>
> KWin::Workspace::allowClientActivation: Activation: No client active,
> allowing

What I think is going on is that KWin sees the system tray as a separate 
top-level widget. When the focus is on it, clicking on the desktop causes to 
send the desktop widget's application an ApplicationActivated event and then 
the system tray's application an ApplicationDeactivated event. Because they 
are the same application, the desktop loses focus too. The attached patch, 
although very hackish, fixes the issue by preventing the system tray widget 
from getting focus.

Chani's patch in the "Plasma and the window manager" thread that makes adds 
Qt::X11BypassWindowManagerHint to SystemTrayWidget also prevents the system 
tray from getting focus and thus also fixes the issue - but in a much better 
fashion. :)

--
Jason Stubbs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: systemtray-focus.diff
Type: text/x-diff
Size: 465 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071117/33fcaf56/attachment.bin 


More information about the Panel-devel mailing list