#include "bctimer.h"
#include "bcwindow.h"
-#include "colors.h"
+#include "bccolors.h"
#include "keys.h"
#include "mutex.h"
#include "condition.h"
this->age = 0;
this->seq_no = 0;
this->in_use = 1;
+ this->hidden = 0;
}
VIcon::
timer = new Timer();
this->refresh_rate = VICON_RATE;
done = 0;
- interrupted = 1;
+ interrupted = -1;
}
VIconThread::
draw_lock->unlock();
if( Thread::running() ) {
Thread::cancel();
- Thread::join();
}
+ Thread::join();
t_heap.remove_all_objects();
delete timer;
delete draw_lock;
wdw->lock_window("VIconThread::start_drawing");
if( view_win )
wdw->set_active_subwindow(view_win);
- if( interrupted )
+ if( interrupted < 0 )
draw_lock->unlock();
+ interrupted = 0;
wdw->unlock_window();
}
{
wdw->lock_window("VIconThread::stop_drawing");
set_view_popup(0);
- interrupted = 1;
+ if( !interrupted )
+ interrupted = 1;
wdw->unlock_window();
}
bool VIconThread::
visible(VIcon *vicon, int x, int y)
{
+ if( vicon->hidden ) return false;
int y0 = 0;
int my = y + vicon->vh;
if( my <= y0 ) return false;
{
while(!done) {
draw_lock->lock("VIconThread::run 0");
- if( done ) break;;
+ if( done ) break;
wdw->lock_window("BC_WindowBase::run 1");
- interrupted = 0;
drawing_started();
reset_images();
int64_t seq_no = 0, now = 0;