summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-17 13:38:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-17 13:44:35 +0100
commitdfe7142cdd05707123c688b2a746bed63180ff52 (patch)
tree94d61a2f88c06b893ea11c3020afa864575a0b2f
parent5c3c69bb15d324d48f171ce2c3a3f3fea2f08958 (diff)
MouseClick -> MouseMove + MouseClick undesirably mimics a drag event
when we click, if the click does not occur at the last known location of the mouse, we generate a mouse move event to this location, and then send the click event. But we are sending the move event with the current mouse-button held down state so it appears as a mini drag from the last known mouse location to the click site. This makes the slide pane in impress believe an attempt to drag a slide has occured, which is super annoying when trying to use the slide pane a lot. It would seem a more sensible thing to generate a move event with the buttons masked out and then continue to send the true button click afterwards. Change-Id: I5d0caf2cc1c9381800346f0b069af58123473cab
-rw-r--r--vcl/source/window/winproc.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 3f3d0b2e1454..d72d48e5fba9 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -289,7 +289,8 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
if ( (pWinFrameData->mnLastMouseX != nX) ||
(pWinFrameData->mnLastMouseY != nY) )
{
- ImplHandleMouseEvent( xWindow, MouseNotifyEvent::MOUSEMOVE, false, nX, nY, nMsgTime, nCode, nMode );
+ sal_uInt16 nMoveCode = nCode & ~(MOUSE_LEFT | MOUSE_RIGHT | MOUSE_MIDDLE);
+ ImplHandleMouseEvent(xWindow, MouseNotifyEvent::MOUSEMOVE, false, nX, nY, nMsgTime, nMoveCode, nMode);
}
}