From 71d6e19ae8b2086ed420ed401c3c1285cf9fc89f Mon Sep 17 00:00:00 2001 From: Rob Scheepmaker Date: Mon, 15 Dec 2008 16:50:47 +0000 Subject: [PATCH] Don't allow extenderitems to be dragged when plasma is locked. svn path=/trunk/KDE/kdelibs/; revision=897287 --- extenderitem.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/extenderitem.cpp b/extenderitem.cpp index a63d7782b..2e93550b2 100644 --- a/extenderitem.cpp +++ b/extenderitem.cpp @@ -500,7 +500,8 @@ void ExtenderItem::resizeEvent(QGraphicsSceneResizeEvent *event) void ExtenderItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { - if (!(d->dragHandleRect().contains(event->pos()))) { + if (!(d->dragHandleRect().contains(event->pos())) || + d->extender->d->applet->immutability() != Plasma::Mutable) { event->ignore(); return; } @@ -655,7 +656,8 @@ void ExtenderItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) void ExtenderItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event) { - if (d->titleRect().contains(event->pos())) { + if (d->titleRect().contains(event->pos()) && + d->extender->d->applet->immutability() == Plasma::Mutable) { if (!d->mouseOver) { QApplication::setOverrideCursor(Qt::OpenHandCursor); d->mouseOver = true; @@ -1070,6 +1072,8 @@ void ExtenderItemPrivate::resizeContent(const QSizeF &newSize) void ExtenderItemPrivate::previousTargetExtenderDestroyed(QObject *o) { + Q_UNUSED(o) + previousTargetExtender = 0; }