summaryrefslogtreecommitdiff
path: root/vcl/inc/dndeventdispatcher.hxx
AgeCommit message (Collapse)Author
2023-07-18fix DNDEventDispatcher::findTopLevelWindowNoel Grandin
for the unlikely case of antiparallel desktop (whatever that is) regression from commit ea05f2aa4e28fd40238c4962e9dcbbf0d873cabd Author: Norbert Thiebaud <nthiebaud@gmail.com> Date: Thu Oct 14 22:12:16 2010 -0500 migrate OClearableGuard(SoalrMutex) to SolarMutexGuard when the code findTopLevelWindow was extracted into its own method, the location parameter was not made a reference, which is necessary to propogate the update that occurs in OutputDevice::ReMirror Change-Id: I37c18497660cd157ca4e4cfb1cbb60ed07e11da5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154586 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-24tdf#149626 use recursive_mutex to fix hang in macro callback during dndCaolán McNamara
See frame #5 and frame #45 where both the same DNDEventDispatcher object and both functions lock m_aMutex which is a std::mutex since commit 8de81db4e3fca488d50db2d74734109b31541a6f Date: Mon Aug 2 09:21:17 2021 +0200 osl::Mutex->std::mutex in DNDEventDispatcher #0 0x00007ff094530c40 in __lll_lock_wait () at /lib64/libc.so.6 #1 0x00007ff0945371d2 in pthread_mutex_lock@@GLIBC_2.2.5 () at /lib64/libc.so.6 #2 0x00007ff08b901663 in __gthread_mutex_lock(pthread_mutex_t*) (__mutex=0x1a32c60) at /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/x86_64-redhat-linux/bits/gthr-default.h:749 #3 0x00007ff08b9024d5 in std::mutex::lock() (this=0x1a32c60) at /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/std_mutex.h:100 #4 0x00007ff08b9018f3 in std::scoped_lock<std::mutex>::scoped_lock(std::mutex&) (this=0x7ffdd0d79240, __m=...) at /usr/bin/../lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/mutex:731 #5 0x00007ff08b9006a8 in DNDEventDispatcher::dragOver(com::sun::star::datatransfer::dnd::DropTargetDragEvent const&) (this=0x1a32c10, dtde=...) at vcl/source/window/dndeventdispatcher.cxx:156 #6 0x00007ff075f47658 in GtkInstDropTarget::fire_dragOver(com::sun::star::datatransfer::dnd::DropTargetDragEvent const&) (this=0x199eb40, dtde=...) at vcl/unx/gtk3/gtkinst.cxx:1710 #7 0x00007ff0760a7010 in GtkInstDropTarget::signalDragMotion(_GtkWidget*, _GdkDragContext*, int, int, unsigned int) (this=0x199eb40, pWidget=0x1c67e40, context=0x1957450, x=89, y=175, time=0) at vcl/unx/gtk3/gtkframe.cxx:5026 #8 0x00007ff07609bb77 in GtkSalFrame::signalDragMotion(_GtkWidget*, _GdkDragContext*, int, int, unsigned int, void*) (pWidget=0x1c67e40, context=0x1957450, x=89, y=175, time=0, frame=0x19b7d70) at vcl/unx/gtk3/gtkframe.cxx:4922 #9 0x00007ff075649527 in _gtk_marshal_BOOLEAN__OBJECT_INT_INT_UINTv () at /lib64/libgtk-3.so.0 #10 0x00007ff0865dcd5b in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0 #11 0x00007ff0865ddeb8 in g_signal_emit_by_name () at /lib64/libgobject-2.0.so.0 #12 0x00007ff07595b491 in gtk_drag_dest_motion.lto_priv () at /lib64/libgtk-3.so.0 #13 0x00007ff0757b8f7d in gtk_main_do_event () at /lib64/libgtk-3.so.0 #14 0x00007ff0754e5463 in _gdk_event_emit () at /lib64/libgdk-3.so.0 #15 0x00007ff075518056 in gdk_event_source_dispatch () at /lib64/libgdk-3.so.0 #16 0x00007ff0864c3faf in g_main_context_dispatch () at /lib64/libglib-2.0.so.0 #17 0x00007ff0865192c8 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0 #18 0x00007ff0864c1940 in g_main_context_iteration () at /lib64/libglib-2.0.so.0 #19 0x00007ff075f3e60f in GtkSalData::Yield(bool, bool) (this=0x952930, bWait=false, bHandleAllCurrentEvents=false) at vcl/unx/gtk3/gtkdata.cxx:405 #20 0x00007ff075f43e43 in GtkInstance::DoYield(bool, bool) (this=0x9527e0, bWait=false, bHandleAllCurrentEvents=false) at vcl/unx/gtk3/gtkinst.cxx:428 #21 0x00007ff08c2dc5df in ImplYield(bool, bool) (i_bWait=false, i_bAllEvents=false) at vcl/source/app/svapp.cxx:474 #22 0x00007ff08c2dc24d in Application::Reschedule(bool) (i_bAllEvents=false) at vcl/source/app/svapp.cxx:493 #23 0x00007ff091eeeb55 in SbiRuntime::Step() (this=0xa21eb20) at basic/source/runtime/runtime.cxx:801 #24 0x00007ff091e0e659 in (anonymous namespace)::RunInitGuard::run() (this=0x76a6290) at basic/source/classes/sbxmod.cxx:1015 #25 0x00007ff091e0d135 in SbModule::Run(SbMethod*) (this=0xa0ada00, pMeth=0xa16d7e0) at basic/source/classes/sbxmod.cxx:1176 #26 0x00007ff091e0c503 in SbModule::Notify(SfxBroadcaster&, SfxHint const&) (this=0xa0ada00, rBC=..., rHint=...) at basic/source/classes/sbxmod.cxx:775 #27 0x00007ff090b3ee6e in SfxBroadcaster::Broadcast(SfxHint const&) (this=0xa231de0, rHint=...) at svl/source/notify/SfxBroadcaster.cxx:39 #28 0x00007ff091e1372e in SbMethod::Broadcast(SfxHintId) (this=0xa231ca0, nHintId=SfxHintId::BasicDataWanted) at basic/source/classes/sbxmod.cxx:2113 #29 0x00007ff091f6ddfa in SbxObject::Call(rtl::OUString const&, SbxArray*) (this=0xa258670, rName="DTL_dragOver", pParam=0xa1e47d0) at basic/source/sbx/sbxobj.cxx:274 #30 0x00007ff091d9dd76 in StarBASIC::Call(rtl::OUString const&, SbxArray*) (this=0xa258670, rName="DTL_dragOver", pParam=0xa1e47d0) at basic/source/classes/sb.cxx:1324 #31 0x00007ff091dd7127 in (anonymous namespace)::BasicAllListener_Impl::firing_impl(com::sun::star::script::AllEventObject const&, com::sun::star::uno::Any*) (this=0xa2344a0, Event=..., pRet=0x0) at basic/source/classes/sbunoobj.cxx:3831 #32 0x00007ff091dd6ba1 in (anonymous namespace)::BasicAllListener_Impl::firing(com::sun::star::script::AllEventObject const&) (this=0xa2344a0, Event=...) at basic/source/classes/sbunoobj.cxx:3855 #33 0x00007ff091dd792f in (anonymous namespace)::InvocationToAllListenerMapper::invoke(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) (this=0xa110b70, FunctionName="dragOver", Params=uno::Sequence of length 1 = {...}) at basic/source/classes/sbunoobj.cxx:3983 #34 0x00007ff091dd7be7 in non-virtual thunk to (anonymous namespace)::InvocationToAllListenerMapper::invoke(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&, com::sun::star::uno::Sequence<short>&, com::sun::star::uno::Sequence<com::sun::star::uno::Any>&) () at /home/caolan/LibreOffice/core/instdir/program/libsblo.so #35 0x00007ff072d19921 in gcc3::callVirtualMethod(void*, unsigned int, void*, _typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, unsigned long*, double*) (pThis=0xa110b98, nVtableIndex=4, pRegisterReturn=0x7ffdd0d7b5c0, pReturnTypeRef=0xa875c0, bSimpleReturn=false, pStack=0x7ffdd0d7b5e0, nStack=0, pGPR=0x7ffdd0d7b900, pFPR=0x7ffdd0d7b8c0) at bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77 #36 0x00007ff072d184fc in cpp_call(bridges::cpp_uno::shared::UnoInterfaceProxy*, bridges::cpp_uno::shared::VtableSlot, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void*, void**, _uno_Any**) (pThis=0xa238bb0, aVtableSlot=..., pReturnTypeRef=0xa875c0, nParams=4, pParams=0x2470e40, pUnoReturn=0x7ffdd0d7bb80, pUnoArgs=0x7ffdd0d7bbb0, ppUnoExc=0x7ffdd0d7bb60) at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:233 #37 0x00007ff072d17c58 in unoInterfaceProxyDispatch(uno_Interface*, typelib_TypeDescription const*, void*, void**, uno_Any**) (pUnoI=0xa238bb0, pMemberDescr=0x24c98c0, pReturn=0x7ffdd0d7bb80, pArgs=0x7ffdd0d7bbb0, ppException=0x7ffdd0d7bb60) at bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx:413 #38 0x00007ff0472645ca in stoc_invadp::(anonymous namespace)::AdapterImpl::invoke(_typelib_TypeDescription const*, void*, void**, _uno_Any**) (this=0xa112060, pMemberType=0xa11be80, pReturn=0x7ffdd0d7c4f0, pArgs=0x7ffdd0d7bca0, ppException=0x7ffdd0d7bde0) at stoc/source/invocation_adapterfactory/iafactory.cxx:457 #39 0x00007ff04726379d in stoc_invadp::adapter_dispatch(_uno_Interface*, _typelib_TypeDescription const*, void*, void**, _uno_Any**) (pUnoI=0xa118a50, pMemberType=0xa11be80, pReturn=0x7ffdd0d7c4f0, pArgs=0x7ffdd0d7bca0, ppException=0x7ffdd0d7bde0) at stoc/source/invocation_adapterfactory/iafactory.cxx:605 #40 0x00007ff072d04e95 in cpp2uno_call(bridges::cpp_uno::shared::CppInterfaceProxy*, _typelib_TypeDescription const*, _typelib_TypeDescriptionReference*, int, _typelib_MethodParameter*, void**, void**, void**, unsigned long*) (pThis=0xa11b350, pMemberTypeDescr=0xa11be80, pReturnTypeRef=0x939280, nParams=1, pParams=0xa112460, gpreg=0x7ffdd0d7c520, fpreg=0x7ffdd0d7c540, ovrflw=0x7ffdd0d7c590, pRegisterReturn=0x7ffdd0d7c4f0) at bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:191 #41 0x00007ff072d04611 in cpp_vtable_call(sal_Int32, sal_Int32, void**, void**, void**, sal_uInt64*) (nFunctionIndex=7, nVtableOffset=0, gpreg=0x7ffdd0d7c510, fpreg=0x7ffdd0d7c540, ovrflw=0x7ffdd0d7c590, pRegisterReturn=0x7ffdd0d7c4f0) at bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx:389 #42 0x00007ff072d29836 in privateSnippetExecutor () at /home/caolan/LibreOffice/core/instdir/program/libgcc3_uno.so #43 0x00007ff08b903787 in DNDListenerContainer::fireDragOverEvent(com::sun::star::uno::Reference<com::sun::star::datatransfer::dnd::XDropTargetDragContext> const&, signed char, int, int, signed char) (this=0x5a444c0, context=uno::Reference to ((anonymous namespace)::GtkDropTargetDragContext *) 0xa1dda68, dropAction=1 '\001', locationX=89, locationY=33, sourceActions=3 '\003') at vcl/source/window/dndlistenercontainer.cxx:224 #44 0x00007ff08b900b7d in DNDEventDispatcher::fireDragOverEvent(vcl::Window*, com::sun::star::uno::Reference<com::sun::star::datatransfer::dnd::XDropTargetDragContext> const&, signed char, Point const&, signed char) (pWindow=0x5a27060, xContext=uno::Reference to ((anonymous namespace)::GtkDropTargetDragContext *) 0xa1dda68, nDropAction=1 '\001', rLocation=Point = {...}, nSourceActions=3 '\003') at vcl/source/window/dndeventdispatcher.cxx:297 #45 0x00007ff08b9007f5 in DNDEventDispatcher::dragOver(com::sun::star::datatransfer::dnd::DropTargetDragEvent const&) (this=0x1a32c10, dtde=...) at vcl/source/window/dndeventdispatcher.cxx:178 #46 0x00007ff075f47658 in GtkInstDropTarget::fire_dragOver(com::sun::star::datatransfer::dnd::DropTargetDragEvent const&) (this=0x199eb40, dtde=...) at vcl/unx/gtk3/gtkinst.cxx:1710 Change-Id: I06f24ac50d6d029803d46974162e1afec898d866 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136401 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-02osl::Mutex->std::mutex in DNDEventDispatcherNoel Grandin
Change-Id: I95e4dc636fc16095044d01e1c1e1314f107b23b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119850 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-27loplugin:finalclasses in vclNoel Grandin
Change-Id: If22569a1b7d53fc1b5b87f7ec7d262ebb260e798 Reviewed-on: https://gerrit.libreoffice.org/83933 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-13tdf#42949 Fix IWYU warnings in vcl/inc/*Gabor Kelemen
Platform-specific subdirs are left alone: android, ios, osx, quartz, win Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Icbb906b7fbc960240c73c56d3dae2a78b06a0f53 Reviewed-on: https://gerrit.libreoffice.org/73754 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-19New loplugin:dynexcspec: Add @throws documentation, vclStephan Bergmann
Change-Id: Icc398ec6cbb9152ee86b4ac0003619ae04206cd6
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-01-25vcl: fix dndeventdispatcher.hxx header guardsChris Sherlock
Change-Id: Ic0091aa2a78f3340c3d71e6a6b48f330e556ac5b
2016-01-25vcl: move dndevdis.{hxx|cxx} to dndeventdispatcher.{hxx|cxx}Chris Sherlock
Change-Id: Ia9d41552a8361e086d6fcb379e041522d40fb7e9