From 26f153dd97dec1d4757edbdbf844228204c97a42 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Wed, 9 Dec 2009 04:17:09 +0000 Subject: [PATCH] fixed location of dragging icon in outline mode svn path=/trunk/KDE/kdebase/workspace/; revision=1060481 --- clients/oxygen/oxygenclient.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 54310788ca..055c100738 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -1487,7 +1487,14 @@ namespace Oxygen // note: the pixmap is moved just above the pointer on purpose // because overlapping pixmap and pointer slows down the pixmap alot. - drag->setHotSpot( QPoint( event->pos().x() - geometry.left(), -1 ) ); + QPoint hotSpot( QPoint( event->pos().x() - geometry.left(), -1 ) ); + + // make sure the horizontal hotspot position is not too far away (more than 1px) + // from the pixmap + if( hotSpot.x() < -1 ) hotSpot.setX(-1); + if( hotSpot.x() > geometry.width() ) hotSpot.setX( geometry.width() ); + + drag->setHotSpot( hotSpot ); dragStartTimer_.start( 50, this ); drag->exec( Qt::MoveAction );