Properly account for decoration padding when calculating mousePosition in buttonReleaseEvent.

CCBUG: 231844

svn path=/trunk/KDE/kdebase/workspace/; revision=1108849
This commit is contained in:
Hugo Pereira Da Costa 2010-03-29 22:09:53 +00:00
parent 6fe694c38f
commit 1ef8be34a4

View file

@ -1397,9 +1397,7 @@ bool Client::buttonReleaseEvent( Window w, int /*button*/, int state, int x, int
{ {
finishMoveResize( false ); finishMoveResize( false );
// mouse position is still relative to old Client position, adjust it // mouse position is still relative to old Client position, adjust it
QPoint mousepos( x_root - x, y_root - y ); QPoint mousepos( x_root - x + padding_left, y_root - y + padding_top );
if( w == frameId() )
mousepos += QPoint( padding_left, padding_top );
mode = mousePosition( mousepos ); mode = mousePosition( mousepos );
} }
else if( workspace()->decorationSupportsClientGrouping() ) else if( workspace()->decorationSupportsClientGrouping() )