add layout_scale preference, scaling cleanup, rework init bc_resources, init tip_info...
[goodguy/cinelerra.git] / cinelerra-5.1 / guicast / bcwindowbase.C
index 1810abc3f6fd943076cbdb6ab20edc1a16a5ba83..0d9f95d4eede1a54100c45376e4b53a00fae282f 100644 (file)
@@ -69,17 +69,8 @@ BC_ResizeCall::BC_ResizeCall(int w, int h)
 }
 
 
-
-
-
-
-
 int BC_WindowBase::shm_completion_event = -1;
-
-
-
-BC_Resources BC_WindowBase::resources;
-
+BC_Resources *BC_WindowBase::resources = 0;
 Window XGroupLeader = 0;
 
 Mutex BC_KeyboardHandlerLock::keyboard_listener_mutex("keyboard_listener",0);
@@ -149,7 +140,11 @@ BC_WindowBase::~BC_WindowBase()
 //printf("delete glx=%08x, win=%08x %s\n", (unsigned)glx_win, (unsigned)win, title);
 #ifdef HAVE_GL
        if( get_resources()->get_synchronous() && glx_win != 0 ) {
+               if( window_type == MAIN_WINDOW )
+                       unlock_window();
                get_resources()->get_synchronous()->delete_window(this);
+               if( window_type == MAIN_WINDOW )
+                       lock_window("BC_WindowBase::delete_window");
        }
 #endif
        XDestroyWindow(top_level->display, win);
@@ -456,8 +451,19 @@ int BC_WindowBase::create_window(BC_WindowBase *parent_window, const char *title
                vis = get_glx_visual(display);
                if( !vis )
 #endif
+               {
+                       int mask = VisualDepthMask | VisualClassMask;
+                       static XVisualInfo vinfo;
+                       memset(&vinfo, 0, sizeof(vinfo));
+                       vinfo.depth = 24;
+                       vinfo.c_class = TrueColor;
+                       int nitems = 0;
+                       XVisualInfo *vis_info = XGetVisualInfo(display, mask, &vinfo, &nitems);
+                       vis = vis_info && nitems>0 ? vis_info[0].visual : 0;
+                       if( vis_info ) XFree(vis_info);
+               }
+               if( !vis )
                        vis = DefaultVisual(display, screen);
-
                default_depth = DefaultDepth(display, screen);
 
                client_byte_order = (*(const u_int32_t*)"a   ") & 0x00000001;
@@ -467,7 +473,7 @@ int BC_WindowBase::create_window(BC_WindowBase *parent_window, const char *title
 // This must be done before fonts to know if antialiasing is available.
                init_colors();
 // get the resources
-               if(resources.use_shm < 0) resources.initialize_display(this);
+               if(resources->use_shm < 0) resources->initialize_display(this);
                x_correction = BC_DisplayInfo::get_left_border();
                y_correction = BC_DisplayInfo::get_top_border();
 
@@ -480,7 +486,7 @@ int BC_WindowBase::create_window(BC_WindowBase *parent_window, const char *title
                if(this->y < 0) this->y = 0;
 
                if(this->bg_color == -1)
-                       this->bg_color = resources.get_bg_color();
+                       this->bg_color = resources->get_bg_color();
 
 // printf("bcwindowbase 1 %s\n", title);
 // if(window_type == MAIN_WINDOW) sleep(1);
@@ -566,12 +572,11 @@ int BC_WindowBase::create_window(BC_WindowBase *parent_window, const char *title
                mask = CWEventMask | CWBackPixel | CWColormap |
                        CWOverrideRedirect | CWSaveUnder | CWCursor;
 
-               attr.event_mask = DEFAULT_EVENT_MASKS |
-                       KeyPressMask |
-                       KeyReleaseMask;
+               attr.event_mask = DEFAULT_EVENT_MASKS | ExposureMask |
+                       KeyPressMask | KeyReleaseMask;
 
                if(this->bg_color == -1)
-                       this->bg_color = resources.get_bg_color();
+                       this->bg_color = resources->get_bg_color();
                attr.background_pixel = top_level->get_color(bg_color);
                attr.colormap = top_level->cmap;
                if(top_level->is_hourglass)
@@ -729,9 +734,8 @@ int BC_WindowBase::run_window()
        init_lock->unlock();
 
 // Handle common events
-       while(!done)
-       {
-               dispatch_event(0);
+       while( !done ) {
+               dispatch_event();
        }
 
        unset_all_repeaters();
@@ -887,13 +891,14 @@ pthread_t locking_task = (pthread_t)-1L;
 int locking_event = -1;
 int locking_message = -1;
 
-int BC_WindowBase::dispatch_event(XEvent *event)
+int BC_WindowBase::dispatch_event()
 {
        Window tempwin;
        int result;
        XClientMessageEvent *ptr;
        int cancel_resize, cancel_translation;
        volatile static int debug = 0;
+       XEvent *event;
 
        key_pressed = 0;
 
@@ -959,42 +964,25 @@ if( debug && event->type != ClientMessage ) {
        switch(event->type) {
        case ClientMessage:
 // Clear the resize buffer
-               if(resize_events) dispatch_resize_event(last_resize_w, last_resize_h);
+               if( resize_events )
+                       dispatch_resize_event(last_resize_w, last_resize_h);
 // Clear the motion buffer since this can clear the window
-               if(motion_events)
-               {
+               if( motion_events )
                        dispatch_motion_event();
-               }
 
                ptr = (XClientMessageEvent*)event;
-
-
-               if(ptr->message_type == ProtoXAtom &&
-                       (Atom)ptr->data.l[0] == DelWinXAtom)
-               {
+               if( ptr->message_type == ProtoXAtom &&
+                   (Atom)ptr->data.l[0] == DelWinXAtom ) {
                        close_event();
                }
-               else
-               if(ptr->message_type == RepeaterXAtom)
-               {
+               else if( ptr->message_type == RepeaterXAtom ) {
                        dispatch_repeat_event(ptr->data.l[0]);
-// Make sure the repeater still exists.
-//                             for(int i = 0; i < repeaters.total; i++)
-//                             {
-//                                     if(repeaters.values[i]->repeat_id == ptr->data.l[0])
-//                                     {
-//                                             dispatch_repeat_event_master(ptr->data.l[0]);
-//                                             break;
-//                                     }
-//                             }
                }
-               else
-               if(ptr->message_type == SetDoneXAtom)
-               {
+               else if( ptr->message_type == SetDoneXAtom ) {
                        done = 1;
-                       } else
-                       { // We currently use X marshalling for xatom events, we can switch to something else later
-                               receive_custom_xatoms((xatom_event *)ptr);
+               }
+               else {
+                       receive_custom_xatoms((xatom_event *)ptr);
                }
                break;
 
@@ -1043,12 +1031,12 @@ if( debug && event->type != ClientMessage ) {
                        drag_y1 = cursor_y - get_resources()->drag_radius;
                        drag_y2 = cursor_y + get_resources()->drag_radius;
 
-                       if((long)(button_time3 - button_time1) < resources.double_click * 2)
+                       if((long)(button_time3 - button_time1) < resources->double_click * 2)
                        {
                                triple_click = 1;
                                button_time3 = button_time2 = button_time1 = 0;
                        }
-                       if((long)(button_time3 - button_time2) < resources.double_click)
+                       if((long)(button_time3 - button_time2) < resources->double_click)
                        {
                                double_click = 1;
 //                             button_time3 = button_time2 = button_time1 = 0;
@@ -1083,7 +1071,13 @@ if( debug && event->type != ClientMessage ) {
 
        case Expose:
                event_win = event->xany.window;
-               dispatch_expose_event();
+               result = 0;
+               for( int i=0; !result && i<popups.size(); ++i ) {  // popups take focus
+                       if( popups[i]->win == event_win )
+                               result = popups[i]->dispatch_expose_event();
+               }
+               if( !result )
+                       result = dispatch_expose_event();
                break;
 
        case MotionNotify:
@@ -2089,15 +2083,8 @@ int BC_WindowBase::init_colors()
        char *data = 0;
        XImage *ximage;
        ximage = XCreateImage(top_level->display,
-                                       top_level->vis,
-                                       top_level->default_depth,
-                                       ZPixmap,
-                                       0,
-                                       data,
-                                       16,
-                                       16,
-                                       8,
-                                       0);
+                       top_level->vis, top_level->default_depth,
+                       ZPixmap, 0, data, 16, 16, 8, 0);
        bits_per_pixel = ximage->bits_per_pixel;
        XDestroyImage(ximage);
 
@@ -2308,21 +2295,21 @@ int BC_WindowBase::init_gc()
 
 int BC_WindowBase::init_fonts()
 {
-       if( !(smallfont = XLoadQueryFont(display, _(resources.small_font))) )
-               if( !(smallfont = XLoadQueryFont(display, _(resources.small_font2))) )
+       if( !(smallfont = XLoadQueryFont(display, _(resources->small_font))) )
+               if( !(smallfont = XLoadQueryFont(display, _(resources->small_font2))) )
                        smallfont = XLoadQueryFont(display, "fixed");
-       if( !(mediumfont = XLoadQueryFont(display, _(resources.medium_font))) )
-               if( !(mediumfont = XLoadQueryFont(display, _(resources.medium_font2))) )
+       if( !(mediumfont = XLoadQueryFont(display, _(resources->medium_font))) )
+               if( !(mediumfont = XLoadQueryFont(display, _(resources->medium_font2))) )
                        mediumfont = XLoadQueryFont(display, "fixed");
-       if( !(largefont = XLoadQueryFont(display, _(resources.large_font))) )
-               if( !(largefont = XLoadQueryFont(display, _(resources.large_font2))) )
+       if( !(largefont = XLoadQueryFont(display, _(resources->large_font))) )
+               if( !(largefont = XLoadQueryFont(display, _(resources->large_font2))) )
                        largefont = XLoadQueryFont(display, "fixed");
-       if( !(bigfont = XLoadQueryFont(display, _(resources.big_font))) )
-               if( !(bigfont = XLoadQueryFont(display, _(resources.big_font2))) )
+       if( !(bigfont = XLoadQueryFont(display, _(resources->big_font))) )
+               if( !(bigfont = XLoadQueryFont(display, _(resources->big_font2))) )
                        bigfont = XLoadQueryFont(display, "fixed");
 
-       if((clockfont = XLoadQueryFont(display, _(resources.clock_font))) == NULL)
-               if((clockfont = XLoadQueryFont(display, _(resources.clock_font2))) == NULL)
+       if((clockfont = XLoadQueryFont(display, _(resources->clock_font))) == NULL)
+               if((clockfont = XLoadQueryFont(display, _(resources->clock_font2))) == NULL)
                        clockfont = XLoadQueryFont(display, "fixed");
 
        init_xft();
@@ -2332,19 +2319,19 @@ int BC_WindowBase::init_fonts()
                int n;
 
 // FIXME: should check the m,d,n values
-               smallfontset = XCreateFontSet(display, resources.small_fontset, &m, &n, &d);
+               smallfontset = XCreateFontSet(display, resources->small_fontset, &m, &n, &d);
                if( !smallfontset )
                        smallfontset = XCreateFontSet(display, "fixed,*", &m, &n, &d);
-               mediumfontset = XCreateFontSet(display, resources.medium_fontset, &m, &n, &d);
+               mediumfontset = XCreateFontSet(display, resources->medium_fontset, &m, &n, &d);
                if( !mediumfontset )
                        mediumfontset = XCreateFontSet(display, "fixed,*", &m, &n, &d);
-               largefontset = XCreateFontSet(display, resources.large_fontset, &m, &n, &d);
+               largefontset = XCreateFontSet(display, resources->large_fontset, &m, &n, &d);
                if( !largefontset )
                        largefontset = XCreateFontSet(display, "fixed,*", &m, &n, &d);
-               bigfontset = XCreateFontSet(display, resources.big_fontset, &m, &n, &d);
+               bigfontset = XCreateFontSet(display, resources->big_fontset, &m, &n, &d);
                if( !bigfontset )
                        bigfontset = XCreateFontSet(display, "fixed,*", &m, &n, &d);
-               clockfontset = XCreateFontSet(display, resources.clock_fontset, &m, &n, &d);
+               clockfontset = XCreateFontSet(display, resources->clock_fontset, &m, &n, &d);
                if( !clockfontset )
                        clockfontset = XCreateFontSet(display, "fixed,*", &m, &n, &d);
                if(clockfontset && bigfontset && largefontset && mediumfontset && smallfontset) {
@@ -2368,54 +2355,54 @@ void BC_WindowBase::init_xft()
 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) :
-                       xftFontOpenName(display, screen, resources.small_font_xft))) )
+               (resources->small_font_xft[0] == '-' ?
+                       xftFontOpenXlfd(display, screen, resources->small_font_xft) :
+                       xftFontOpenName(display, screen, resources->small_font_xft))) )
                if(!(smallfont_xft =
-                       xftFontOpenXlfd(display, screen, resources.small_font_xft2)))
+                       xftFontOpenXlfd(display, screen, resources->small_font_xft2)))
                        smallfont_xft = xftFontOpenXlfd(display, screen, "fixed");
        if(!(mediumfont_xft =
-               (resources.medium_font_xft[0] == '-' ?
-                       xftFontOpenXlfd(display, screen, resources.medium_font_xft) :
-                       xftFontOpenName(display, screen, resources.medium_font_xft))) )
+               (resources->medium_font_xft[0] == '-' ?
+                       xftFontOpenXlfd(display, screen, resources->medium_font_xft) :
+                       xftFontOpenName(display, screen, resources->medium_font_xft))) )
                if(!(mediumfont_xft =
-                       xftFontOpenXlfd(display, screen, resources.medium_font_xft2)))
+                       xftFontOpenXlfd(display, screen, resources->medium_font_xft2)))
                        mediumfont_xft = xftFontOpenXlfd(display, screen, "fixed");
        if(!(largefont_xft =
-               (resources.large_font_xft[0] == '-' ?
-                       xftFontOpenXlfd(display, screen, resources.large_font_xft) :
-                       xftFontOpenName(display, screen, resources.large_font_xft))) )
+               (resources->large_font_xft[0] == '-' ?
+                       xftFontOpenXlfd(display, screen, resources->large_font_xft) :
+                       xftFontOpenName(display, screen, resources->large_font_xft))) )
                if(!(largefont_xft =
-                       xftFontOpenXlfd(display, screen, resources.large_font_xft2)))
+                       xftFontOpenXlfd(display, screen, resources->large_font_xft2)))
                        largefont_xft = xftFontOpenXlfd(display, screen, "fixed");
        if(!(bigfont_xft =
-               (resources.big_font_xft[0] == '-' ?
-                       xftFontOpenXlfd(display, screen, resources.big_font_xft) :
-                       xftFontOpenName(display, screen, resources.big_font_xft))) )
+               (resources->big_font_xft[0] == '-' ?
+                       xftFontOpenXlfd(display, screen, resources->big_font_xft) :
+                       xftFontOpenName(display, screen, resources->big_font_xft))) )
                if(!(bigfont_xft =
-                       xftFontOpenXlfd(display, screen, resources.big_font_xft2)))
+                       xftFontOpenXlfd(display, screen, resources->big_font_xft2)))
                        bigfont_xft = xftFontOpenXlfd(display, screen, "fixed");
        if(!(clockfont_xft =
-               (resources.clock_font_xft[0] == '-' ?
-                       xftFontOpenXlfd(display, screen, resources.clock_font_xft) :
-                       xftFontOpenName(display, screen, resources.clock_font_xft))) )
+               (resources->clock_font_xft[0] == '-' ?
+                       xftFontOpenXlfd(display, screen, resources->clock_font_xft) :
+                       xftFontOpenName(display, screen, resources->clock_font_xft))) )
                clockfont_xft = xftFontOpenXlfd(display, screen, "fixed");
 
 
        if(!(bold_smallfont_xft =
-               (resources.small_b_font_xft[0] == '-' ?
-                       xftFontOpenXlfd(display, screen, resources.small_b_font_xft) :
-                       xftFontOpenName(display, screen, resources.small_b_font_xft))) )
+               (resources->small_b_font_xft[0] == '-' ?
+                       xftFontOpenXlfd(display, screen, resources->small_b_font_xft) :
+                       xftFontOpenName(display, screen, resources->small_b_font_xft))) )
                bold_smallfont_xft = xftFontOpenXlfd(display, screen, "fixed");
        if(!(bold_mediumfont_xft =
-               (resources.medium_b_font_xft[0] == '-' ?
-                       xftFontOpenXlfd(display, screen, resources.medium_b_font_xft) :
-                       xftFontOpenName(display, screen, resources.medium_b_font_xft))) )
+               (resources->medium_b_font_xft[0] == '-' ?
+                       xftFontOpenXlfd(display, screen, resources->medium_b_font_xft) :
+                       xftFontOpenName(display, screen, resources->medium_b_font_xft))) )
                bold_mediumfont_xft = xftFontOpenXlfd(display, screen, "fixed");
        if(!(bold_largefont_xft =
-               (resources.large_b_font_xft[0] == '-' ?
-                       xftFontOpenXlfd(display, screen, resources.large_b_font_xft) :
-                       xftFontOpenName(display, screen, resources.large_b_font_xft))) )
+               (resources->large_b_font_xft[0] == '-' ?
+                       xftFontOpenXlfd(display, screen, resources->large_b_font_xft) :
+                       xftFontOpenName(display, screen, resources->large_b_font_xft))) )
                bold_largefont_xft = xftFontOpenXlfd(display, screen, "fixed");
 
        if( !smallfont_xft || !mediumfont_xft || !largefont_xft || !bigfont_xft ||
@@ -2423,14 +2410,14 @@ xft_init_lock.lock("BC_WindowBase::init_xft");
            !clockfont_xft ) {
                printf("BC_WindowBase::init_fonts: no xft fonts found:"
                        " %s=%p\n %s=%p\n %s=%p\n %s=%p\n %s=%p\n %s=%p\n %s=%p\n %s=%p\n",
-                       resources.small_font_xft, smallfont_xft,
-                       resources.medium_font_xft, mediumfont_xft,
-                       resources.large_font_xft, largefont_xft,
-                       resources.big_font_xft, bigfont_xft,
-                       resources.clock_font_xft, clockfont_xft,
-                       resources.small_b_font_xft, bold_smallfont_xft,
-                       resources.medium_b_font_xft, bold_mediumfont_xft,
-                       resources.large_b_font_xft, bold_largefont_xft);
+                       resources->small_font_xft, smallfont_xft,
+                       resources->medium_font_xft, mediumfont_xft,
+                       resources->large_font_xft, largefont_xft,
+                       resources->big_font_xft, bigfont_xft,
+                       resources->clock_font_xft, clockfont_xft,
+                       resources->small_b_font_xft, bold_smallfont_xft,
+                       resources->medium_b_font_xft, bold_mediumfont_xft,
+                       resources->large_b_font_xft, bold_largefont_xft);
                get_resources()->use_xft = 0;
                exit(1);
        }
@@ -3635,12 +3622,12 @@ int BC_WindowBase::get_color_model()
 
 BC_Resources* BC_WindowBase::get_resources()
 {
-       return &BC_WindowBase::resources;
+       return BC_WindowBase::resources;
 }
 
 BC_Synchronous* BC_WindowBase::get_synchronous()
 {
-       return BC_WindowBase::resources.get_synchronous();
+       return BC_WindowBase::resources->get_synchronous();
 }
 
 int BC_WindowBase::get_bg_color()
@@ -3877,13 +3864,13 @@ int BC_WindowBase::get_abs_cursor_y(int lock_window)
 
 void BC_WindowBase::get_pop_cursor(int &px, int &py, int lock_window)
 {
-       int margin = 100;
+       int xmargin = xS(100), ymargin = yS(100);
        get_abs_cursor(px, py, lock_window);
-       if( px < margin ) px = margin;
-       if( py < margin ) py = margin;
-       int wd = get_screen_w(lock_window,-1) - margin;
+       if( px < xmargin ) px = xmargin;
+       if( py < ymargin ) py = ymargin;
+       int wd = get_screen_w(lock_window,-1) - xmargin;
        if( px > wd ) px = wd;
-       int ht = get_screen_h(lock_window,-1) - margin;
+       int ht = get_screen_h(lock_window,-1) - ymargin;
        if( py > ht ) py = ht;
 }
 int BC_WindowBase::get_pop_cursor_x(int lock_window)
@@ -4068,6 +4055,11 @@ int BC_WindowBase::resize_window(int w, int h)
                size_hints.max_width = w;
                size_hints.min_height = h;
                size_hints.max_height = h;
+               if( this->x > -BC_INFINITY && this->x < BC_INFINITY ) {
+                       size_hints.flags |= PPosition;
+                       size_hints.x = this->x;
+                       size_hints.y = this->y;
+               }
                XSetNormalHints(top_level->display, win, &size_hints);
        }
        XResizeWindow(top_level->display, win, w, h);
@@ -4139,21 +4131,15 @@ int BC_WindowBase::reposition_window(int x, int y, int w, int h)
        {
 // KDE shifts window right and down.
 // FVWM leaves window alone and adds border around it.
-               XMoveResizeWindow(top_level->display,
-                       win,
+               XMoveResizeWindow(top_level->display, win,
                        x - BC_DisplayInfo::auto_reposition_x,
                        y - BC_DisplayInfo::auto_reposition_y,
-                       this->w,
-                       this->h);
+                       this->w, this->h);
        }
        else
        {
-               XMoveResizeWindow(top_level->display,
-                       win,
-                       x,
-                       y,
-                       this->w,
-                       this->h);
+               XMoveResizeWindow(top_level->display, win, x, y,
+                       this->w, this->h);
        }
 
        if(resize)
@@ -4297,6 +4283,32 @@ int BC_WindowBase::set_icon(VFrame *data)
        return 0;
 }
 
+void BC_WindowBase::init_resources(float scale)
+{
+       if( resources ) return;
+       XInitThreads();
+       const char *env = getenv("BC_SCALE");
+       if( env ) scale = atof(env);
+       float x_scale = 1, y_scale = 1;
+       if( scale <= 0 ) {
+               BC_DisplayInfo info;
+               int wx, wy, ww, wh;
+               int cins = info.xinerama_big_screen();
+               if( !info.xinerama_geometry(cins, wx, wy, ww, wh) ) {
+                       if( (x_scale = ww/1920.) < 1 ) x_scale = 1;
+                       if( (y_scale = wh/1080.) < 1 ) y_scale = 1;
+               }
+       }
+       else
+               x_scale = y_scale = scale;
+       // constructor sets BC_WindowBase::resources
+       new BC_Resources(x_scale, y_scale);
+}
+void BC_WindowBase::finit_resources()
+{
+       delete resources;  resources = 0;
+}
+
 int BC_WindowBase::set_w(int w)
 {
        this->w = w;
@@ -4311,7 +4323,6 @@ int BC_WindowBase::set_h(int h)
 
 int BC_WindowBase::load_defaults(BC_Hash *defaults)
 {
-       BC_Resources *resources = get_resources();
        char string[BCTEXTLEN];
        int newest_id = - 1;
        for(int i = 0; i < FILEBOX_HISTORY_SIZE; i++)
@@ -4344,7 +4355,6 @@ int BC_WindowBase::load_defaults(BC_Hash *defaults)
 
 int BC_WindowBase::save_defaults(BC_Hash *defaults)
 {
-       BC_Resources *resources = get_resources();
        char string[BCTEXTLEN];
        for(int i = 0; i < FILEBOX_HISTORY_SIZE; i++)
        {
@@ -4373,12 +4383,8 @@ int BC_WindowBase::save_defaults(BC_Hash *defaults)
 
 // For some reason XTranslateCoordinates can take a long time to return.
 // We work around this by only calling it when the event windows are different.
-void BC_WindowBase::translate_coordinates(Window src_w,
-               Window dest_w,
-               int src_x,
-               int src_y,
-               int *dest_x_return,
-               int *dest_y_return)
+void BC_WindowBase::translate_coordinates(Window src_w, Window dest_w,
+               int src_x, int src_y, int *dest_x_return, int *dest_y_return)
 {
        Window tempwin = 0;
 //Timer timer;
@@ -4390,14 +4396,8 @@ void BC_WindowBase::translate_coordinates(Window src_w,
        }
        else
        {
-               XTranslateCoordinates(top_level->display,
-                       src_w,
-                       dest_w,
-                       src_x,
-                       src_y,
-                       dest_x_return,
-                       dest_y_return,
-                       &tempwin);
+               XTranslateCoordinates(top_level->display, src_w, dest_w,
+                       src_x, src_y, dest_x_return, dest_y_return, &tempwin);
 //printf("BC_WindowBase::translate_coordinates 1 %lld\n", timer.get_difference());
        }
 }
@@ -4413,10 +4413,6 @@ void BC_WindowBase::get_win_coordinates(int abs_x, int abs_y, int *x, int *y)
 }
 
 
-
-
-
-
 #ifdef HAVE_LIBXXF86VM
 void BC_WindowBase::closest_vm(int *vm, int *width, int *height)
 {