[Panel-devel] Plasma::PushButton behaviour
Jason Stubbs
jasonbstubbs at gmail.com
Wed Nov 14 17:53:47 CET 2007
Hi again,
I discovered that I'd accidentally deleted a needed #include while cleaning up
the last patch, so here it is again in a state that can be applied and
compiled. ;)
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?
Regards,
Jason Stubbs
On Thursday 15 November 2007 00:38:31 Jason Stubbs wrote:
> Hi all,
>
> I had a go at fixing my issue with Plasma buttons not releasing
> incorrectly. The change linked below did partially fix it, but the desktop
> toolbox buttons would stay pressed if the mouse button was released after
> the toolbox had disappeared.
>
> http://websvn.kde.org/trunk/KDE/kdebase/workspace/libs/plasma/widgets/pushb
>utton.cpp?r1=721138&r2=735135
>
> I ended up reversing the above change so I've attached patches with and
> without the reversal for clarity's sake.
>
> What the patch does:
> * Sets the button to the Released state as soon as the mouse leaves the
> button's area, which makes it behave the same as regular buttons.
> * Relocates an update() so that painting is only done when necessary.
>
> What the patch does not do:
> * Handle the case where a button becomes non-visible while being pressed
> and hovered over. Neither mouseMoveEvent nor mouseReleaseEvent will be
> called in this case.
>
> Regards,
> Jason Stubbs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pushbutton-736643.patch
Type: text/x-diff
Size: 1967 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071115/941c6644/attachment.bin
More information about the Panel-devel
mailing list