summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-02 09:21:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-02 15:49:43 +0200
commit8de81db4e3fca488d50db2d74734109b31541a6f (patch)
tree6527fb706f9443ee586248942a104880b22792e2 /vcl
parent76b619cca484fb681a8f3c175337fda3aabe3c0f (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/dndeventdispatcher.hxx3
-rw-r--r--vcl/source/window/dndeventdispatcher.cxx12
2 files changed, 8 insertions, 7 deletions
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 );