X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvicon.C;h=f9978b26ebf0e917b1d7f6852a26b72dbf670c6d;hb=d60a59baa6cfe24c0fb153ed9e150a834ba29feb;hp=b7fd0f6c70bd0dd8ce4e8d06b7fadd4b05cf83f7;hpb=09ccfde5a1fd65069f69b37490462b7ccf38a336;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/guicast/vicon.C b/cinelerra-5.1/guicast/vicon.C index b7fd0f6c..f9978b26 100644 --- a/cinelerra-5.1/guicast/vicon.C +++ b/cinelerra-5.1/guicast/vicon.C @@ -105,6 +105,7 @@ VIconThread(BC_WindowBase *wdw, int vw, int vh) this->refresh_rate = VICON_RATE; done = 0; interrupted = -1; + stop_age = 0; } VIconThread:: @@ -130,6 +131,8 @@ start_drawing() wdw->set_active_subwindow(view_win); if( interrupted < 0 ) draw_lock->unlock(); + timer->update(); + timer->subtract(-stop_age); interrupted = 0; wdw->unlock_window(); } @@ -141,6 +144,7 @@ stop_drawing() set_view_popup(0); if( !interrupted ) interrupted = 1; + stop_age = timer->get_difference(); wdw->unlock_window(); } @@ -151,12 +155,6 @@ int VIconThread::keypress_event(int key) return 1; } -int ViewPopup::button_press_event() -{ - vt->set_view_popup(0); - return 1; -} - bool VIconThread:: visible(VIcon *vicon, int x, int y) { @@ -173,6 +171,7 @@ int ViewPopup::keypress_event() int key = get_keypress(); return vt->keypress_event(key); } + ViewPopup::ViewPopup(VIconThread *vt, VFrame *frame, int x, int y, int w, int h) : BC_Popup(vt->wdw, x, y, w, h, BLACK) { @@ -235,14 +234,13 @@ int VIconThread::del_vicon(VIcon *&vicon) void VIconThread::set_view_popup(VIcon *vicon) { - if( !vicon && this->vicon ) - this->vicon->stop_audio(); this->vicon = vicon; } int VIconThread:: update_view() { + if( viewing ) viewing->stop_audio(); delete view_win; view_win = 0; if( (viewing=vicon) != 0 ) { VFrame *frame = viewing->frame(); @@ -292,7 +290,10 @@ draw(VIcon *vicon) void VIconThread::hide_vicons(int v) { - for( int i=0; ihidden = v; + for( int i=0; ihidden = v; + t_heap[i]->age = 0; + } } void VIconThread::