Kaydet (Commit) b43b7a59 authored tarafından Caolán McNamara's avatar Caolán McNamara

move aLastWheelEvent into svdata

just to keep them together and to drop the need for a static

Change-Id: I55c784f9fc075f4542542ee2ec649eff32d708ec
üst a00757e7
......@@ -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
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment