clipedit remove vs delete
[goodguy/history.git] / cinelerra-5.0 / guicast / bcwindowbase.C
index 13eb4cd1d91fd8c8b4cf0d8829db66ee4d766d7d..797dbbc62baa246f765bc43db3839f21b50b98c2 100644 (file)
@@ -33,7 +33,6 @@
 #include "bcsubwindow.h"
 #include "bcsynchronous.h"
 #include "bctimer.h"
-#include "bcwidgetgrid.h"
 #include "bcwindowbase.h"
 #include "bcwindowevents.h"
 #include "bccmodels.h"
@@ -134,15 +133,6 @@ BC_WindowBase::~BC_WindowBase()
                delete subwindows;
        }
 
-       if(widgetgrids) {
-               while (widgetgrids->total) {
-                       delete widgetgrids->last();
-                       widgetgrids->remove();
-               }
-               delete widgetgrids;
-       }
-
-
        delete pixmap;
 
 #ifdef HAVE_GL
@@ -264,7 +254,6 @@ int BC_WindowBase::initialize()
        top_level = 0;
        parent_window = 0;
        subwindows = 0;
-       widgetgrids = 0;
        xinerama_info = 0;
        xinerama_screens = 0;
        xvideo_port_id = -1;
@@ -421,7 +410,6 @@ int BC_WindowBase::create_window(BC_WindowBase *parent_window,
        if(bg_pixmap) shared_bg_pixmap = 1;
 
        subwindows = new BC_SubWindowList;
-       widgetgrids = new BC_WidgetGridList;
 
        if(window_type == MAIN_WINDOW)
        {
@@ -2265,6 +2253,9 @@ int BC_WindowBase::init_fonts()
 void BC_WindowBase::init_xft()
 {
 #ifdef HAVE_XFT
+// does not seem to be thread safe (07/06/2015)
+       static Mutex xft_lock;
+       xft_lock.lock("BC_WindowBase::init_xft");
        if(!(smallfont_xft =
                (resources.small_font_xft[0] == '-' ?
                        XftFontOpenXlfd(display, screen, resources.small_font_xft) :
@@ -2304,6 +2295,7 @@ void BC_WindowBase::init_xft()
                get_resources()->use_xft = 0;
                exit(1);
        }
+       xft_lock.unlock();
 #endif // HAVE_XFT
 }
 
@@ -3154,13 +3146,6 @@ BC_WindowBase* BC_WindowBase::add_tool(BC_WindowBase *subwindow)
        return add_subwindow(subwindow);
 }
 
-BC_WidgetGrid* BC_WindowBase::add_widgetgrid(BC_WidgetGrid *widgetgrid)
-{
-       widgetgrids->append(widgetgrid);
-       return widgetgrid;
-}
-
-
 int BC_WindowBase::flash(int x, int y, int w, int h, int flush)
 {
 //printf("BC_WindowBase::flash %d %d %d %d %d\n", __LINE__, w, h, this->w, this->h);
@@ -3894,11 +3879,6 @@ int BC_WindowBase::resize_event(int w, int h)
        return 0;
 }
 
-int BC_WindowBase::reposition_widget(int x, int y, int w, int h)
-{
-       return reposition_window(x, y, w, h);
-}
-
 int BC_WindowBase::reposition_window(int x, int y)
 {
        reposition_window(x, y, -1, -1);