add file size toggle icons, ff_lut3d icon, fullscrn clk2play fix, timebar endpt curso...
[goodguy/history.git] / cinelerra-5.1 / guicast / bcwindowbase.C
index 597a0ec99c2f9e265790fa16ee5a8104006b041d..6f45933f714b85bf548054dde862b291c3b96941 100644 (file)
@@ -2338,6 +2338,9 @@ void BC_WindowBase::init_xft()
 {
 #ifdef HAVE_XFT
        if( !get_resources()->use_xft ) return;
+// apparently, xft is not reentrant, more than this is needed
+static Mutex xft_init_lock("BC_WindowBase::xft_init_lock", 0);
+xft_init_lock.lock("BC_WindowBase::init_xft");
        if(!(smallfont_xft =
                (resources.small_font_xft[0] == '-' ?
                        XftFontOpenXlfd(display, screen, resources.small_font_xft) :
@@ -2407,6 +2410,7 @@ void BC_WindowBase::init_xft()
        }
 // _XftDisplayInfo needs a lock.
        XftDefaultHasRender(display);
+xft_init_lock.unlock();
 #endif // HAVE_XFT
 }
 
@@ -3844,12 +3848,9 @@ int BC_WindowBase::get_cursor_over_window()
        int ret = XQueryPointer(display, win,
                &root_return, &child_return, &abs_x, &abs_y,
                &win_x, &win_y, &temp_mask);
-//printf("BC_WindowBase::get_cursor_over_window %d %s 0x%x %d 0x%x\n",
-//  __LINE__, title, win, ret, child_return);
-
-       int result = !ret || child_return == None ? 0 :
-               match_window(child_return);
-       return result;
+       if( ret && win != root_return && child_return != None )
+               ret = match_window(child_return);
+       return ret;
 }
 
 int BC_WindowBase::cursor_above()
@@ -4252,6 +4253,7 @@ int BC_WindowBase::load_defaults(BC_Hash *defaults)
        resources->filebox_columnwidth[1] = defaults->get("FILEBOX_WIDTH1", resources->filebox_columnwidth[1]);
        resources->filebox_columnwidth[2] = defaults->get("FILEBOX_WIDTH2", resources->filebox_columnwidth[2]);
        resources->filebox_columnwidth[3] = defaults->get("FILEBOX_WIDTH3", resources->filebox_columnwidth[3]);
+       resources->filebox_size_format = defaults->get("FILEBOX_SIZE_FORMAT", get_resources()->filebox_size_format);
        defaults->get("FILEBOX_FILTER", resources->filebox_filter);
        return 0;
 }
@@ -4279,6 +4281,7 @@ int BC_WindowBase::save_defaults(BC_Hash *defaults)
        defaults->update("FILEBOX_WIDTH2", resources->filebox_columnwidth[2]);
        defaults->update("FILEBOX_WIDTH3", resources->filebox_columnwidth[3]);
        defaults->update("FILEBOX_FILTER", resources->filebox_filter);
+       defaults->update("FILEBOX_SIZE_FORMAT", get_resources()->filebox_size_format);
        return 0;
 }