From 1ef8be34a499f92b03329074d3b99193be7d3c78 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Mon, 29 Mar 2010 22:09:53 +0000 Subject: [PATCH] Properly account for decoration padding when calculating mousePosition in buttonReleaseEvent. CCBUG: 231844 svn path=/trunk/KDE/kdebase/workspace/; revision=1108849 --- events.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/events.cpp b/events.cpp index 300d42f55a..3647b85729 100644 --- a/events.cpp +++ b/events.cpp @@ -1397,9 +1397,7 @@ bool Client::buttonReleaseEvent( Window w, int /*button*/, int state, int x, int { finishMoveResize( false ); // mouse position is still relative to old Client position, adjust it - QPoint mousepos( x_root - x, y_root - y ); - if( w == frameId() ) - mousepos += QPoint( padding_left, padding_top ); + QPoint mousepos( x_root - x + padding_left, y_root - y + padding_top ); mode = mousePosition( mousepos ); } else if( workspace()->decorationSupportsClientGrouping() )