summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/source/lib/init.cxx11
-rw-r--r--include/vcl/window.hxx7
-rw-r--r--vcl/source/window/window.cxx68
3 files changed, 6 insertions, 80 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 670032a18211..f87caa5b0787 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -73,6 +73,7 @@
#include <svx/ruler.hxx>
#include <svx/svxids.hrc>
#include <svx/ucsubset.hxx>
+#include <vcl/vclevent.hxx>
#include <vcl/svapp.hxx>
#include <unotools/resmgr.hxx>
#include <tools/fract.hxx>
@@ -2269,10 +2270,10 @@ static void doc_postWindowKeyEvent(LibreOfficeKitDocument* /*pThis*/, unsigned n
switch (nType)
{
case LOK_KEYEVENT_KEYINPUT:
- pWindow->LOKKeyInput(aEvent);
+ Application::PostKeyEvent(VclEventId::WindowKeyInput, pWindow, &aEvent);
break;
case LOK_KEYEVENT_KEYUP:
- pWindow->LOKKeyUp(aEvent);
+ Application::PostKeyEvent(VclEventId::WindowKeyUp, pWindow, &aEvent);
break;
default:
assert(false);
@@ -2449,13 +2450,13 @@ static void doc_postWindowMouseEvent(LibreOfficeKitDocument* /*pThis*/, unsigned
switch (nType)
{
case LOK_MOUSEEVENT_MOUSEBUTTONDOWN:
- pWindow->LogicMouseButtonDown(aEvent);
+ Application::PostMouseEvent(VclEventId::WindowMouseButtonDown, pWindow, &aEvent);
break;
case LOK_MOUSEEVENT_MOUSEBUTTONUP:
- pWindow->LogicMouseButtonUp(aEvent);
+ Application::PostMouseEvent(VclEventId::WindowMouseButtonUp, pWindow, &aEvent);
break;
case LOK_MOUSEEVENT_MOUSEMOVE:
- pWindow->LogicMouseMove(aEvent);
+ Application::PostMouseEvent(VclEventId::WindowMouseMove, pWindow, &aEvent);
break;
default:
assert(false);
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 0f2bc9024ea3..b7cab1b6dbc9 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1220,13 +1220,6 @@ public:
/// Dialog / window tunneling related methods.
Size PaintActiveFloatingWindow(VirtualDevice& rDevice) const;
- void LogicMouseButtonDown(const MouseEvent& rMouseEvent);
- void LogicMouseButtonUp(const MouseEvent& rMouseEvent);
- void LogicMouseMove(const MouseEvent& rMouseEvent);
-
- void LOKKeyInput(const KeyEvent& rKeyEvent);
- void LOKKeyUp(const KeyEvent& rKeyEvent);
-
/** @name Accessibility
*/
///@{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index efe76df74b7c..cb6b48077c80 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3231,74 +3231,6 @@ VclPtr<vcl::Window> Window::GetParentWithLOKNotifier()
return pWindow;
}
-struct LOKAsyncEvent
-{
- VclPtr<vcl::Window> mpWindow;
- SalEvent mnEvent;
- MouseEvent maMouseEvent;
-};
-
-static void LOKAsyncEventLink( void* pEvent, void* )
-{
- LOKAsyncEvent* pLOKEv = static_cast<LOKAsyncEvent*>(pEvent);
- if (!pLOKEv->mpWindow->IsDisposed())
- {
- ImplWindowFrameProc(pLOKEv->mpWindow, pLOKEv->mnEvent, &pLOKEv->maMouseEvent);
- }
- delete pLOKEv;
-}
-
-void Window::LogicMouseButtonDown(const MouseEvent& rMouseEvent)
-{
- // When we're not doing tiled rendering, then positions must be passed as pixels.
- assert(comphelper::LibreOfficeKit::isActive());
-
- LOKAsyncEvent* pEv = new LOKAsyncEvent;
- pEv->mpWindow = ImplIsFloatingWindow() ? ImplGetBorderWindow() : this;
- pEv->mnEvent = SalEvent::ExternalMouseButtonDown;
- pEv->maMouseEvent = rMouseEvent;
- Application::PostUserEvent( Link<void*, void>(pEv, LOKAsyncEventLink) );
-
-}
-
-void Window::LogicMouseButtonUp(const MouseEvent& rMouseEvent)
-{
- // When we're not doing tiled rendering, then positions must be passed as pixels.
- assert(comphelper::LibreOfficeKit::isActive());
-
- LOKAsyncEvent* pEv = new LOKAsyncEvent;
- pEv->mpWindow = ImplIsFloatingWindow() ? ImplGetBorderWindow() : this;
- pEv->mnEvent = SalEvent::ExternalMouseButtonUp;
- pEv->maMouseEvent = rMouseEvent;
- Application::PostUserEvent( Link<void*, void>(pEv, LOKAsyncEventLink) );
-}
-
-void Window::LogicMouseMove(const MouseEvent& rMouseEvent)
-{
- // When we're not doing tiled rendering, then positions must be passed as pixels.
- assert(comphelper::LibreOfficeKit::isActive());
-
- LOKAsyncEvent* pEv = new LOKAsyncEvent;
- pEv->mpWindow = ImplIsFloatingWindow() ? ImplGetBorderWindow() : this;
- pEv->mnEvent = SalEvent::ExternalMouseMove;
- pEv->maMouseEvent = rMouseEvent;
- Application::PostUserEvent( Link<void*, void>(pEv, LOKAsyncEventLink) );
-}
-
-void Window::LOKKeyInput(const KeyEvent& rKeyEvent)
-{
- assert(comphelper::LibreOfficeKit::isActive());
-
- ImplWindowFrameProc(this, SalEvent::ExternalKeyInput, &rKeyEvent);
-}
-
-void Window::LOKKeyUp(const KeyEvent& rKeyEvent)
-{
- assert(comphelper::LibreOfficeKit::isActive());
-
- ImplWindowFrameProc(this, SalEvent::ExternalKeyUp, &rKeyEvent);
-}
-
void Window::ImplCallDeactivateListeners( vcl::Window *pNew )
{
// no deactivation if the newly activated window is my child