summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/dtrans/X11_selection.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/generic/dtrans/X11_selection.cxx')
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index 9c11fe0587d2..d4cccb2488bc 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -59,6 +59,7 @@
#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
#include <com/sun/star/awt/MouseEvent.hpp>
#include <com/sun/star/awt/MouseButton.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <rtl/tencinfo.h>
#include <osl/process.h>
@@ -3746,13 +3747,9 @@ void SelectionManager::run( void* pThis )
timeval aLast;
gettimeofday( &aLast, 0 );
- css::uno::Reference< XMultiServiceFactory > xFact( ::comphelper::getProcessServiceFactory() );
- if( xFact.is() )
- {
- This->m_xDesktop.set(xFact->createInstance( ::rtl::OUString("com.sun.star.frame.Desktop") ), UNO_QUERY);
- if (This->m_xDesktop.is())
- This->m_xDesktop->addTerminateListener(This);
- }
+ css::uno::Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ This->m_xDesktop.set( Desktop::create(xContext) );
+ This->m_xDesktop->addTerminateListener(This);
while( osl_scheduleThread(This->m_aThread) )
{