diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-05-07 11:49:46 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-07 11:49:46 +0200 |
commit | 93f5d5a9190e0e03bf4822663652a4b068c44f75 (patch) | |
tree | 9ac61601b056acad6a6c83d728c684661d3f3271 /vcl/inc | |
parent | c6fdd34c16f415629222348631141c3e13af6d4a (diff) |
The opaque PostUserEvent IDs are actually pointers
...so declare them as such. This avoids the recurring mistake of storing such
IDs as sal_uInt32, truncating in 64 bit environments, causing RemoveUserEvent to
potentially not remove the event, it thus firing "too late" and probably causing
a crash.
While at it, consolidate the trivially unnecessary overloads of both
Application::PostUserEvent and Window::PostUserEvent. And in each of them, it
looks like deleting the mpLink member was missing from the failure branch.
Change-Id: Iab13afbb06e12ac15dec6a6b5b85a7e402a3c654
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/toolbox.h | 2 | ||||
-rw-r--r-- | vcl/inc/window.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h index 43c0c914e3b8..9056ec55e043 100644 --- a/vcl/inc/toolbox.h +++ b/vcl/inc/toolbox.h @@ -139,7 +139,7 @@ struct ImplToolBoxPrivateData // the optional custom menu PopupMenu* mpMenu; sal_uInt16 maMenuType; - sal_uIntPtr mnEventId; + ImplSVEvent * mnEventId; // called when menu button is clicked and before the popup menu is executed Link maMenuButtonHdl; diff --git a/vcl/inc/window.h b/vcl/inc/window.h index 089583692f87..d42eeb20ca67 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -140,8 +140,8 @@ struct ImplFrameData sal_Int32 mnDPIY; // Original Screen Resolution ImplMapRes maMapUnitRes; // for LogicUnitToPixel sal_uIntPtr mnAllSaveBackSize; // size of all bitmaps of saved backgrounds - sal_uIntPtr mnFocusId; // FocusId for PostUserLink - sal_uIntPtr mnMouseMoveId; // MoveId for PostUserLink + ImplSVEvent * mnFocusId; // FocusId for PostUserLink + ImplSVEvent * mnMouseMoveId; // MoveId for PostUserLink long mnLastMouseX; // last x mouse position long mnLastMouseY; // last y mouse position long mnBeforeLastMouseX; // last but one x mouse position |