akirad fixups for splash, folders, icons
[goodguy/history.git] / cinelerra-5.0 / guicast / bcwindowbase.C
index 21a91f71983e406bf2fc0fba9bfbf9436c2af41b..5f0eb5fd329446375da521cdaa4af70f05de09cf 100644 (file)
@@ -136,19 +136,9 @@ BC_WindowBase::~BC_WindowBase()
        delete pixmap;
 
 #ifdef HAVE_GL
-       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");
-                       glXMakeContextCurrent(top_level->display, 0, 0, 0);
-                       XDestroyWindow(top_level->display, win);
-                       sync_unlock();
-                       unlock_window();
-               }
-               else
-                       get_resources()->get_synchronous()->delete_window(this);
-       }
+       if( get_resources()->get_synchronous() &&
+               (top_level->options & GLX_WINDOW) && glx_win != 0 )
+               get_resources()->get_synchronous()->delete_window(this);
        else
 #endif
                XDestroyWindow(top_level->display, win);
@@ -461,8 +451,8 @@ int BC_WindowBase::create_window(BC_WindowBase *parent_window,
                init_colors();
 // get the resources
                if(resources.use_shm < 0) resources.initialize_display(this);
-               x_correction = get_resources()->get_left_border();
-               y_correction = get_resources()->get_top_border();
+               x_correction = BC_DisplayInfo::get_left_border();
+               y_correction = BC_DisplayInfo::get_top_border();
 
 // clamp window placement
                if(this->x + this->w + x_correction > root_w)
@@ -2274,7 +2264,7 @@ void BC_WindowBase::init_xft()
        if(!(largefont_xft =
                (resources.large_font_xft[0] == '-' ?
                        XftFontOpenXlfd(display, screen, resources.large_font_xft) :
-                       XftFontOpenXlfd(display, screen, resources.large_font_xft))) )
+                       XftFontOpenName(display, screen, resources.large_font_xft))) )
                if(!(largefont_xft =
                        XftFontOpenXlfd(display, screen, resources.large_font_xft2)))
                        largefont_xft = XftFontOpenXlfd(display, screen, "fixed");
@@ -4199,6 +4189,15 @@ void BC_WindowBase::translate_coordinates(Window src_w,
        }
 }
 
+void BC_WindowBase::get_root_coordinates(int x, int y, int *abs_x, int *abs_y)
+{
+       translate_coordinates(win, top_level->rootwin, x, y, abs_x, abs_y);
+}
+
+void BC_WindowBase::get_win_coordinates(int abs_x, int abs_y, int *x, int *y)
+{
+       translate_coordinates(top_level->rootwin, win, abs_x, abs_y, x, y);
+}