KDE/kdebase/workspace/libs/plasma/widgets (silent)
Jason Stubbs
jasonbstubbs at gmail.com
Wed Jan 16 12:40:18 CET 2008
Any reason why this was silent? Unrelated to this commit exactly, but this bug
would have been avoided entirely had the "have we moved?" code been kept with
the "move me" code...
On Wednesday 16 January 2008 03:56:23 JST, Marco Martin wrote:
> SVN commit 761954 by mart:
>
> SVN_SILENT: don't pass click also on action icons when the mouse was moved
>
> M +8 -9 icon.cpp
>
>
> --- trunk/KDE/kdebase/workspace/libs/plasma/widgets/icon.cpp #761953:761954
> @@ -1009,19 +1009,18 @@
>
> d->states &= ~Private::PressedState;
>
> - bool handled = false;
> - foreach (IconAction *action, d->cornerActions) {
> - if (action->event(event->type(), event->pos())) {
> - handled = true;
> - break;
> + //don't pass click when the mouse was moved
> + bool handled = d->clickStartPos != scenePos();
> + if (!handled) {
> + foreach (IconAction *action, d->cornerActions) {
> + if (action->event(event->type(), event->pos())) {
> + handled = true;
> + break;
> + }
> }
> }
>
> if (!handled) {
> - handled = d->clickStartPos != scenePos();
> - }
> -
> - if (!handled) {
> if (boundingRect().contains(event->pos())) {
> emit clicked();
> if (KGlobalSettings::singleClick()) {
--
Jason Stubbs
More information about the Panel-devel
mailing list