#include <string.h>
#include <unistd.h>
#include <wchar.h>
+#include <typeinfo>
#include <X11/extensions/Xinerama.h>
#include <X11/extensions/Xvlib.h>
done = 0;
done_set = 0;
window_running = 0;
+ display_lock_owner = 0;
test_keypress = 0;
keys_return[0] = 0;
is_deleting = 0;
}
-
-
-
draw_background(0, 0, this->w, this->h);
flash(-1, -1, -1, -1, 0);
delete pixmap;
pixmap = new BC_Pixmap(this, w, h);
-
clear_box(0, 0, w, h);
}
this->w = w;
this->h = h;
dispatch_flash();
+ flush();
}
return 0;
}
flash_enabled = 1;
for(int i = 0; i < subwindows->total; i++)
subwindows->values[i]->dispatch_flash();
- return flash();
+ return flash(0);
}
int BC_WindowBase::dispatch_translation_event()
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
{
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);
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;
}
{
delete pixmap;
pixmap = new BC_Pixmap(this, this->w, this->h);
+ clear_box(0,0, this->w, this->h);
// Propagate to menubar
for(int i = 0; i < subwindows->total; i++)
{
{
if(bg_pixmap && !shared_bg_pixmap) delete bg_pixmap;
- bg_pixmap = new BC_Pixmap(this,
- bitmap,
- PIXMAP_OPAQUE);
+ bg_pixmap = new BC_Pixmap(this, bitmap, PIXMAP_OPAQUE);
shared_bg_pixmap = 0;
draw_background(0, 0, w, h);
}
int BC_WindowBase::set_icon(VFrame *data)
{
if(icon_pixmap) delete icon_pixmap;
- icon_pixmap = new BC_Pixmap(top_level,
- data,
- PIXMAP_ALPHA,
- 1);
+ icon_pixmap = new BC_Pixmap(top_level, data, PIXMAP_ALPHA, 1);
if(icon_window) delete icon_window;
icon_window = new BC_Popup(this,
}
+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();
+}
+