summaryrefslogtreecommitdiff
path: root/src/Fl_win32.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2010-09-27 14:57:53 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2010-09-27 14:57:53 +0000
commitb010bce1af756d007d194eba16202dd9dcba80c7 (patch)
tree6f9ca34d3fbf08a1147b314c85e1194618216358 /src/Fl_win32.cxx
parent5c968a2589f3a32a01d17db0130ead4e778fbd80 (diff)
Fixed unbalanced Windows OleInitialize/OleUnitialize calls
when loading/unloading the FLTK dll (STR #2417) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7706 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_win32.cxx')
-rw-r--r--src/Fl_win32.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index af04135d7..53f65eebb 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1554,14 +1554,10 @@ Fl_X* Fl_X::make(Fl_Window* w) {
// Drag-n-drop requires GCC 3.x or a non-GNU compiler...
#if !defined(__GNUC__) || __GNUC__ >= 3
// Register all windows for potential drag'n'drop operations
- static char oleInitialized = 0;
- if (!oleInitialized) { OleInitialize(0L); oleInitialized=1; }
-
+ fl_OleInitialize();
RegisterDragDrop(x->xid, flIDropTarget);
+
if (!fl_aimm) {
- static char been_here = 0;
- if (!been_here && !oleInitialized) CoInitialize(NULL);
- been_here = 1;
CoCreateInstance(CLSID_CActiveIMM, NULL, CLSCTX_INPROC_SERVER,
IID_IActiveIMMApp, (void**) &fl_aimm);
if (fl_aimm) {