From a2e7f090a14035128e352384582bc4e615f65dd5 Mon Sep 17 00:00:00 2001 From: Chani Armitage Date: Tue, 29 Dec 2009 23:23:25 +0000 Subject: [PATCH] give wallpaper priority over containmentactions in all events CCMAIL: plasma-devel@kde.org note that the wallpaper is only getting wheel events and move events when itemAt != this, which is different from the "if there's no applet there" logic that's used for containmentactions stuff. this could have... odd... effects for containments that use graphicsitems, like folderview. in general it seems like this code's gotten crufty and could do with some cleanup, once someone decides what the 'proper' behaviour actually is. svn path=/trunk/KDE/kdelibs/; revision=1067596 --- containment.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/containment.cpp b/containment.cpp index df2809ed2..1667710cd 100644 --- a/containment.cpp +++ b/containment.cpp @@ -1639,16 +1639,6 @@ void Containment::wheelEvent(QGraphicsSceneWheelEvent *event) return; //no unexpected click-throughs } - 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()) { QGraphicsItem *item = scene()->itemAt(event->scenePos()); if (item == this) { @@ -1661,6 +1651,16 @@ void Containment::wheelEvent(QGraphicsSceneWheelEvent *event) } } + 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; + } + event->ignore(); Applet::wheelEvent(event); }