fix nvidia gl lock problem, update active vwindow tests
[goodguy/history.git] / cinelerra-5.0 / guicast / bcwindowbase.C
index 21a91f71983e406bf2fc0fba9bfbf9436c2af41b..59963d6d4b5dd31ea511a6a287fa9b31ab4d4044 100644 (file)
@@ -139,12 +139,12 @@ BC_WindowBase::~BC_WindowBase()
        if( get_resources()->get_synchronous() && top_level->options & GLX_WINDOW ) {
                if( !glx_win ) {
 // NVIDIA library threading problem, XCloseDisplay SEGVs without this
-                       lock_window("BC_WindowBase::~BC_WindowBase:XDestroyWindow");
                        sync_lock("BC_WindowBase::~BC_WindowBase:XDestroyWindow");
+                       lock_window("BC_WindowBase::~BC_WindowBase:XDestroyWindow");
                        glXMakeContextCurrent(top_level->display, 0, 0, 0);
                        XDestroyWindow(top_level->display, win);
-                       sync_unlock();
                        unlock_window();
+                       sync_unlock();
                }
                else
                        get_resources()->get_synchronous()->delete_window(this);