summaryrefslogtreecommitdiff
path: root/dtrans
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-04-04 11:46:22 +0300
committerTor Lillqvist <tml@collabora.com>2017-04-04 12:55:36 +0300
commitf1e2c030b09d25a285d6a206297f0ef7526ccc4a (patch)
treee3233e637a4a7be97f7c0c33c0c5940e45db0308 /dtrans
parentae013f9ce09fbb6709bc2af7b85c66dd31e73eff (diff)
tdf#105162: Need to call epoxy_handle_external_wglMakeCurrent()
... in SourceContext::fire_dragDropEnd, it seems, because it runs in a thread in its own. Educated guess based on debugging, turned out to work. Change-Id: I084a1af30b1f7e157aafdb2d95866d767fc0f8d6
Diffstat (limited to 'dtrans')
-rw-r--r--dtrans/Library_dnd.mk5
-rw-r--r--dtrans/source/win32/dnd/sourcecontext.cxx5
2 files changed, 10 insertions, 0 deletions
diff --git a/dtrans/Library_dnd.mk b/dtrans/Library_dnd.mk
index 9ce6c4439e05..689bbe6303f4 100644
--- a/dtrans/Library_dnd.mk
+++ b/dtrans/Library_dnd.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_Library_use_libraries,dnd,\
cppu \
cppuhelper \
sal \
+ vcl \
$(gb_UWINAPI) \
))
@@ -48,6 +49,10 @@ $(eval $(call gb_Library_use_static_libraries,dnd,\
dtobj \
))
+$(eval $(call gb_Library_use_externals,dnd,\
+ epoxy \
+ ))
+
$(eval $(call gb_Library_add_exception_objects,dnd,\
dtrans/source/win32/dnd/dndentry \
dtrans/source/win32/dnd/globals \
diff --git a/dtrans/source/win32/dnd/sourcecontext.cxx b/dtrans/source/win32/dnd/sourcecontext.cxx
index 08adfaaea0cb..ea90087d7193 100644
--- a/dtrans/source/win32/dnd/sourcecontext.cxx
+++ b/dtrans/source/win32/dnd/sourcecontext.cxx
@@ -19,6 +19,9 @@
#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
+#include <epoxy/wgl.h>
+#include <vcl/opengl/OpenGLWrapper.hxx>
+
#include "sourcecontext.hxx"
using namespace com::sun::star::datatransfer::dnd;
@@ -71,6 +74,8 @@ void SAL_CALL SourceContext::transferablesFlavorsChanged( )
// Fires XDragSourceListener::dragDropEnd events.
void SourceContext::fire_dragDropEnd( bool success, sal_Int8 effect)
{
+ if( OpenGLWrapper::isVCLOpenGLEnabled() )
+ epoxy_handle_external_wglMakeCurrent();
DragSourceDropEvent e;