Bug 167551 - plasma applets on desktop not receiving mouse leave events
Summary: plasma applets on desktop not receiving mouse leave events
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-27 23:14 UTC by Ambroz Bizjak
Modified: 2008-07-29 02:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
fix (463 bytes, patch)
2008-07-28 01:48 UTC, Ambroz Bizjak
Details
fix (2.31 KB, patch)
2008-07-28 02:39 UTC, Ambroz Bizjak
Details
fix (1.87 KB, patch)
2008-07-28 02:59 UTC, Ambroz Bizjak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ambroz Bizjak 2008-07-27 23:14:28 UTC
Version:            (using Devel)
Installed from:    Compiled sources
OS:                Linux

Any plasma applet that is placed on the desktop (not in a panel) will not receive mouse leave events that consider the applet as a whole.
One example is the battery applet, where a charge percentage appears when hovering over it, but does not disappear when the mouse leaves it. Another is the Digital Clock applet, where a popup with the time and date appears, but does not disappear.
The applets mentioned work fine if used inside a panel.
Comment 1 Ambroz Bizjak 2008-07-28 01:48:21 UTC
Created attachment 26445 [details]
fix

This fixes the problem. The cause was the applet handle, which installed a
sceneEventFilter, but did propagate the leave event (it uses it to disappear).
This makes its sceneEventFilter always return false, propagating all events to
the applet.
Comment 2 Ambroz Bizjak 2008-07-28 02:39:28 UTC
Created attachment 26446 [details]
fix

This one also removes a minor inconsistency that was caused by relaying the
event to the contained applet. That is, sometimes the event is first delivered
to the contained widget instead of the handle widget, which caused it to appear
or disappear immediately, while it disappears or appears after a small timeout
if the leave event is delivered to the handle widget. This removes calling of
startFading from within the contained widget's event handler, leaving it up to
the applet.
Comment 3 Ambroz Bizjak 2008-07-28 02:52:37 UTC
Sorry, typo in last sentence; it leaves fading in and out to the applet handle, as the applet handle anyway intercepts all hover events, and there is no need to do any fading from within the contained widget.
Comment 4 Ambroz Bizjak 2008-07-28 02:59:30 UTC
Created attachment 26447 [details]
fix

oops, accidentally included a fix for the battery bug...
Comment 5 Aaron J. Seigo 2008-07-29 02:08:25 UTC
SVN commit 838889 by aseigo:

hand hover events more responsibly in containment and applethandle; another patch by ambro

(abro: one more solid patch like this and i'll be hitting you up to get an svn account of your own ;)

BUG:167551


 M  +0 -1      applethandle.cpp  
 M  +1 -11     containment.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=838889
Comment 6 Aaron J. Seigo 2008-07-29 02:26:27 UTC
SVN commit 838890 by aseigo:

backport fix for 167551 to 4.0.x
CCBUG:167551


 M  +0 -1      applethandle.cpp  
 M  +1 -11     containment.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=838890