X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvicon.C;h=92986663ccc25c910fbeee2ae369b4cb2aa177d2;hb=3f6a262cfe390b3f8b275297d64565a5b6272969;hp=deb3c57fd6370b1aa7af9b7d54ca4c88b8c01b9c;hpb=3ec3a9cc6afc6561311686b3ec597ee3c1d80d6f;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/guicast/vicon.C b/cinelerra-5.1/guicast/vicon.C index deb3c57f..92986663 100644 --- a/cinelerra-5.1/guicast/vicon.C +++ b/cinelerra-5.1/guicast/vicon.C @@ -2,7 +2,7 @@ #include "bctimer.h" #include "bcwindow.h" -#include "colors.h" +#include "bccolors.h" #include "keys.h" #include "mutex.h" #include "condition.h" @@ -17,6 +17,7 @@ VIcon(int vw, int vh, double rate) this->age = 0; this->seq_no = 0; this->in_use = 1; + this->hidden = 0; } VIcon:: @@ -76,7 +77,7 @@ VIconThread(BC_WindowBase *wdw, int vw, int vh) timer = new Timer(); this->refresh_rate = VICON_RATE; done = 0; - interrupted = 1; + interrupted = -1; } VIconThread:: @@ -100,8 +101,9 @@ start_drawing() 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(); } @@ -110,7 +112,8 @@ stop_drawing() { wdw->lock_window("VIconThread::stop_drawing"); set_view_popup(0); - interrupted = 1; + if( !interrupted ) + interrupted = 1; wdw->unlock_window(); } @@ -130,6 +133,7 @@ int ViewPopup::button_press_event() 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; @@ -260,9 +264,8 @@ run() { 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;