diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-03-13 17:18:11 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-03-14 10:14:11 +0100 |
commit | efef0583c62be4aeb5c360621cb3072ff336eb6b (patch) | |
tree | 346a86de3e7931b5292810811b054e04ac2b4da3 /include/vcl | |
parent | 1da82a6e80cd2147839031250dba10976560962d (diff) |
LOK: re-factor async key & mouse event re-posting.
A fairly pure re-factor, although adding disposed window
checking to a number of sites with a warning.
Moves the event emission helpers from VCL into SfxLokHelper: we're
going to need more view / integration here next anyway.
Removes lots of copy/paste horror.
Change-Id: I279c11a1d8093b4feeeb6b7850f500806fff80dd
Reviewed-on: https://gerrit.libreoffice.org/69218
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/ITiledRenderable.hxx | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx index d0118e2d809a..0b31f60e04ad 100644 --- a/include/vcl/ITiledRenderable.hxx +++ b/include/vcl/ITiledRenderable.hxx @@ -40,56 +40,6 @@ protected: int mnTilePixelWidth, mnTilePixelHeight; int mnTileTwipWidth, mnTileTwipHeight; public: - struct LOKAsyncEventData - { - VclPtr<vcl::Window> mpWindow; - VclEventId mnEvent; - MouseEvent maMouseEvent; - KeyEvent maKeyEvent; - }; - - static void LOKPostAsyncEvent(void* pEv, void*) - { - LOKAsyncEventData* pLOKEv = static_cast<LOKAsyncEventData*>(pEv); - if (pLOKEv->mpWindow->IsDisposed()) - return; - - switch (pLOKEv->mnEvent) - { - case VclEventId::WindowKeyInput: - pLOKEv->mpWindow->KeyInput(pLOKEv->maKeyEvent); - break; - case VclEventId::WindowKeyUp: - pLOKEv->mpWindow->KeyUp(pLOKEv->maKeyEvent); - break; - case VclEventId::WindowMouseButtonDown: - pLOKEv->mpWindow->LogicMouseButtonDown(pLOKEv->maMouseEvent); - // Invoke the context menu - if (pLOKEv->maMouseEvent.GetButtons() & MOUSE_RIGHT) - { - const CommandEvent aCEvt(pLOKEv->maMouseEvent.GetPosPixel(), CommandEventId::ContextMenu, true, nullptr); - pLOKEv->mpWindow->Command(aCEvt); - } - break; - case VclEventId::WindowMouseButtonUp: - pLOKEv->mpWindow->LogicMouseButtonUp(pLOKEv->maMouseEvent); - - // sometimes MouseButtonDown captures mouse and starts tracking, and VCL - // will not take care of releasing that with tiled rendering - if (pLOKEv->mpWindow->IsTracking()) - pLOKEv->mpWindow->EndTracking(); - - break; - case VclEventId::WindowMouseMove: - pLOKEv->mpWindow->LogicMouseMove(pLOKEv->maMouseEvent); - break; - default: - assert(false); - break; - } - - delete pLOKEv; - } virtual ~ITiledRenderable(); @@ -318,7 +268,6 @@ public: { return OUString(); } - }; } // namespace vcl |