remove whitespace at eol
[goodguy/history.git] / cinelerra-5.1 / guicast / bcwindowbase.C
index c54685a41070cb335d2c2989badacf69202ce4c3..75e37fb472633a6db03eb7a0d88293d39021a137 100644 (file)
@@ -53,6 +53,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <wchar.h>
+#include <typeinfo>
 
 #include <X11/extensions/Xinerama.h>
 #include <X11/extensions/Xvlib.h>
@@ -249,6 +250,7 @@ int BC_WindowBase::initialize()
        done = 0;
        done_set = 0;
        window_running = 0;
+       display_lock_owner = 0;
        test_keypress = 0;
        keys_return[0] = 0;
        is_deleting = 0;
@@ -2815,7 +2817,7 @@ int BC_WindowBase::get_single_text_width(int font, const char *text, int length)
        if(get_resources()->use_fontset && top_level->get_fontset(font))
                return XmbTextEscapement(top_level->get_fontset(font), text, length);
        else
-       if(get_font_struct(font)) 
+       if(get_font_struct(font))
                return XTextWidth(get_font_struct(font), text, length);
        else
        {
@@ -3288,9 +3290,9 @@ void BC_WindowBase::set_done(int return_value)
                ptr->message_type = SetDoneXAtom;
                ptr->format = 32;
                this->return_value = return_value;
-// May lock up here because XSendEvent doesn't work too well 
+// May lock up here because XSendEvent doesn't work too well
 // asynchronous with XNextEvent.
-// This causes BC_WindowEvents to forward a copy of the event to run_window where 
+// This causes BC_WindowEvents to forward a copy of the event to run_window where
 // it is deleted.
 // Deletion of event_thread is done at the end of BC_WindowBase::run_window() - by calling the destructor
                put_event(event);
@@ -3756,13 +3758,15 @@ int BC_WindowBase::get_cursor_y()
 
 int BC_WindowBase::dump_windows()
 {
-       printf("\tBC_WindowBase::dump_windows window=%p win=%p\n",
-               this, (void*)this->win);
+       printf("\tBC_WindowBase::dump_windows window=%p win=%p '%s', %dx%d+%d+%d %s\n",
+               this, (void*)this->win, title, w,h,x,y, typeid(*this).name());
        for(int i = 0; i < subwindows->size(); i++)
                subwindows->get(i)->dump_windows();
-       for(int i = 0; i < popups.size(); i++)
-               printf("\tBC_WindowBase::dump_windows popup=%p win=%p\n",
-                       popups.get(i), (void*)popups.get(i)->win);
+       for(int i = 0; i < popups.size(); i++) {
+               BC_WindowBase *p = popups[i];
+               printf("\tBC_WindowBase::dump_windows popup=%p win=%p '%s', %dx%d+%d+%d %s\n",
+                       p, (void*)p->win, p->title, p->w,p->h,p->x,p->y, typeid(*p).name());
+       }
        return 0;
 }
 
@@ -4356,3 +4360,15 @@ BC_Pixmap *BC_WindowBase::create_pixmap(VFrame *vframe)
 }
 
 
+void BC_WindowBase::flicker(int n, int ms)
+{
+       int color = get_bg_color();
+       for( int i=2*n; --i>=0; ) {
+               set_inverse();          set_bg_color(WHITE);
+               clear_box(0,0, w,h);    flash(1);
+               sync_display();         Timer::delay(ms);
+       }
+       set_bg_color(color);
+       set_opaque();
+}
+