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

List:       kde-commits
Subject:    Re: KDE/kdelibs/plasma
From:       Chani <chanika () gmail ! com>
Date:       2009-08-25 21:55:13
Message-ID: 200908251455.23607.chanika () gmail ! com
[Download RAW message or body]


On August 25, 2009 09:14:06 Aaron J. Seigo wrote:
> SVN commit 1015482 by aseigo:
> 
> send in both press and release events

but... that means wallpaper gets priority over the user's configured plugins. 
that means that if a wallpaper accepts a leftclick without considering 
modifiers it'll make any plugins configured for any kind of left-click just not 
work. :/
do we really want that behaviour?

> 
> 
>  M  +18 -20    containment.cpp
> 
> 
> --- trunk/KDE/kdelibs/plasma/containment.cpp #1015481:1015482
> @@ -524,14 +524,6 @@
>          return; //no unexpected click-throughs
>      }
> 
> -    QString trigger = ContainmentActions::eventToString(event);
> -
> -    //FIXME what if someone changes the modifiers before the mouseup?
> -    if (d->actionPlugins.contains(trigger)) {
> -        kDebug() << "accepted mousedown";
> -        event->accept();
> -    }
> -
>      if (d->wallpaper && d->wallpaper->isInitialized() &&
>  !event->isAccepted()) { d->wallpaper->mousePressEvent(event);
>      }
> @@ -539,7 +531,15 @@
>      if (event->isAccepted()) {
>          setFocus(Qt::MouseFocusReason);
>      } else {
> -        event->accept();
> +        QString trigger = ContainmentActions::eventToString(event);
> +        if (d->actionPlugins.contains(trigger)) {
> +            if (d->prepareContainmentActions(trigger, event->screenPos()))
>  { +                d->actionPlugins.value(trigger)->contextEvent(event); +
>             }
> +            event->accept();
> +            return;
> +        }
> +
>          Applet::mousePressEvent(event);
>      }
>  }
> @@ -554,21 +554,19 @@
> 
>      QString trigger = ContainmentActions::eventToString(event);
> 
> -    if (d->actionPlugins.contains(trigger)) {
> -        if (d->prepareContainmentActions(trigger, event->screenPos())) {
> -            d->actionPlugins.value(trigger)->contextEvent(event);
> -        }
> -        event->accept();
> -        return;
> -    }
> -
>      if (d->wallpaper && d->wallpaper->isInitialized()) {
>          d->wallpaper->mouseReleaseEvent(event);
>      }
> 
> -    if (event->isAccepted() || !isContainment()) {
> -        //do nothing
> -    } else {
> +    if (!event->isAccepted() && isContainment()) {
> +        if (d->actionPlugins.contains(trigger)) {
> +            if (d->prepareContainmentActions(trigger, event->screenPos()))
>  { +                d->actionPlugins.value(trigger)->contextEvent(event); +
>             }
> +            event->accept();
> +            return;
> +        }
> +
>          event->accept();
>          Applet::mouseReleaseEvent(event);
>      }
> 

-- 
This message brought to you by eevil bananas and the number 3.
www.chani3.com

["signature.asc" (application/pgp-signature)]

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

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