vcl/inc/dndeventdispatcher.hxx | 3 ++- vcl/source/window/dndeventdispatcher.cxx | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-)
New commits: commit 8de81db4e3fca488d50db2d74734109b31541a6f Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Aug 2 09:21:17 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Aug 2 15:49:43 2021 +0200 osl::Mutex->std::mutex in DNDEventDispatcher Change-Id: I95e4dc636fc16095044d01e1c1e1314f107b23b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119850 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/inc/dndeventdispatcher.hxx b/vcl/inc/dndeventdispatcher.hxx index bc2f5d9991e8..e29e76a7d039 100644 --- a/vcl/inc/dndeventdispatcher.hxx +++ b/vcl/inc/dndeventdispatcher.hxx @@ -26,6 +26,7 @@ #include <com/sun/star/datatransfer/dnd/XDragGestureListener.hpp> #include <cppuhelper/implbase.hxx> #include <vcl/window.hxx> +#include <mutex> class DNDEventDispatcher final : public ::cppu::WeakImplHelper< css::datatransfer::dnd::XDropTargetListener, @@ -38,7 +39,7 @@ class DNDEventDispatcher final : public ::cppu::WeakImplHelper< void designate_currentwindow(vcl::Window *pWindow); DECL_LINK(WindowEventListener, VclWindowEvent&, void); - ::osl::Mutex m_aMutex; + std::mutex m_aMutex; css::uno::Sequence< css::datatransfer::DataFlavor > m_aDataFlavorList; vcl::Window* findTopLevelWindow(Point location); diff --git a/vcl/source/window/dndeventdispatcher.cxx b/vcl/source/window/dndeventdispatcher.cxx index 0afa4501eb71..f5083437c5f6 100644 --- a/vcl/source/window/dndeventdispatcher.cxx +++ b/vcl/source/window/dndeventdispatcher.cxx @@ -86,7 +86,7 @@ void DNDEventDispatcher::designate_currentwindow(vcl::Window *pWindow) void SAL_CALL DNDEventDispatcher::drop( const DropTargetDropEvent& dtde ) { - osl::MutexGuard aImplGuard( m_aMutex ); + std::lock_guard aImplGuard( m_aMutex ); Point location( dtde.LocationX, dtde.LocationY ); @@ -119,7 +119,7 @@ void SAL_CALL DNDEventDispatcher::drop( const DropTargetDropEvent& dtde ) void SAL_CALL DNDEventDispatcher::dragEnter( const DropTargetDragEnterEvent& dtdee ) { - osl::MutexGuard aImplGuard( m_aMutex ); + std::lock_guard aImplGuard( m_aMutex ); Point location( dtdee.LocationX, dtdee.LocationY ); vcl::Window * pChildWindow = findTopLevelWindow(location); @@ -142,7 +142,7 @@ void SAL_CALL DNDEventDispatcher::dragEnter( const DropTargetDragEnterEvent& dtd void SAL_CALL DNDEventDispatcher::dragExit( const DropTargetEvent& /*dte*/ ) { - osl::MutexGuard aImplGuard( m_aMutex ); + std::lock_guard aImplGuard( m_aMutex ); fireDragExitEvent( m_pCurrentWindow ); @@ -153,7 +153,7 @@ void SAL_CALL DNDEventDispatcher::dragExit( const DropTargetEvent& /*dte*/ ) void SAL_CALL DNDEventDispatcher::dragOver( const DropTargetDragEvent& dtde ) { - osl::MutexGuard aImplGuard( m_aMutex ); + std::lock_guard aImplGuard( m_aMutex ); Point location( dtde.LocationX, dtde.LocationY ); sal_Int32 nListeners; @@ -189,7 +189,7 @@ void SAL_CALL DNDEventDispatcher::dragOver( const DropTargetDragEvent& dtde ) void SAL_CALL DNDEventDispatcher::dropActionChanged( const DropTargetDragEvent& dtde ) { - osl::MutexGuard aImplGuard( m_aMutex ); + std::lock_guard aImplGuard( m_aMutex ); Point location( dtde.LocationX, dtde.LocationY ); sal_Int32 nListeners; @@ -225,7 +225,7 @@ void SAL_CALL DNDEventDispatcher::dropActionChanged( const DropTargetDragEvent& void SAL_CALL DNDEventDispatcher::dragGestureRecognized( const DragGestureEvent& dge ) { - osl::MutexGuard aImplGuard( m_aMutex ); + std::lock_guard aImplGuard( m_aMutex ); Point origin( dge.DragOriginX, dge.DragOriginY );