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
This commit is contained in:
Chani Armitage 2009-12-29 23:23:25 +00:00
parent 4def4009c6
commit a2e7f090a1

View File

@ -1639,16 +1639,6 @@ void Containment::wheelEvent(QGraphicsSceneWheelEvent *event)
return; //no unexpected click-throughs 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()) { if (d->wallpaper && d->wallpaper->isInitialized()) {
QGraphicsItem *item = scene()->itemAt(event->scenePos()); QGraphicsItem *item = scene()->itemAt(event->scenePos());
if (item == this) { 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(); event->ignore();
Applet::wheelEvent(event); Applet::wheelEvent(event);
} }