[Libreoffice-commits] core.git: vcl/inc vcl/source
Caolán McNamara
caolanm at redhat.com
Wed Jun 15 20:49:32 UTC 2016
vcl/inc/svdata.hxx | 3 +++
vcl/source/window/winproc.cxx | 7 +++----
2 files changed, 6 insertions(+), 4 deletions(-)
New commits:
commit b43b7a59ca24927c4f4bd90935b4f0075304abe7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jun 15 21:20:33 2016 +0100
move aLastWheelEvent into svdata
just to keep them together and to drop the need for a static
Change-Id: I55c784f9fc075f4542542ee2ec649eff32d708ec
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 39b5610..c1cb3e1 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -31,6 +31,7 @@
#include "vcleventlisteners.hxx"
#include "impfontcache.hxx"
+#include "salwtype.hxx"
#include "xconnection.hxx"
#include <unordered_map>
@@ -194,6 +195,8 @@ struct ImplSVWinData
ImageList* mpMsgBoxImgList; // ImageList for MessageBox
VclPtr<vcl::Window> mpAutoScrollWin; // window, that is in AutoScrollMode mode
VclPtr<vcl::Window> mpLastWheelWindow; // window, that last received a mouse wheel event
+ SalWheelMouseEvent maLastWheelEvent; // the last received mouse whell event
+
StartTrackingFlags mnTrackFlags; // tracking flags
StartAutoScrollFlags mnAutoScrollFlags; // auto scroll flags
bool mbNoDeactivate; // true: do not execute Deactivate
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 1f46253..86871b7 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1474,8 +1474,6 @@ public:
bool HandleWheelEvent::HandleEvent(const SalWheelMouseEvent& rEvt)
{
- static SalWheelMouseEvent aPreviousEvent;
-
if (!Setup())
return false;
@@ -1486,12 +1484,13 @@ bool HandleWheelEvent::HandleEvent(const SalWheelMouseEvent& rEvt)
// avoid the problem that scrolling via wheel to this point brings a widget
// under the mouse that also accepts wheel commands, so stick with the old
// widget if the time gap is very small
- if (shouldReusePreviousMouseWindow(aPreviousEvent, rEvt) && acceptableWheelScrollTarget(pSVData->maWinData.mpLastWheelWindow))
+ if (shouldReusePreviousMouseWindow(pSVData->maWinData.maLastWheelEvent, rEvt) &&
+ acceptableWheelScrollTarget(pSVData->maWinData.mpLastWheelWindow))
{
xMouseWindow = pSVData->maWinData.mpLastWheelWindow;
}
- aPreviousEvent = rEvt;
+ pSVData->maWinData.maLastWheelEvent = rEvt;
pSVData->maWinData.mpLastWheelWindow = Dispatch(xMouseWindow);
More information about the Libreoffice-commits
mailing list