X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvdevicex11.C;h=fc9e84097a0bc2c44f9e99c3510fb755746a1dbc;hb=21eb2e0b479adf7bf846b835e5c7d9613b6f1a6d;hp=793047ac184c065e6a053f2a76cff5bec546af71;hpb=9d832a1fff11b11aaa1108c460690ed05e2bdc05;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/vdevicex11.C b/cinelerra-5.1/cinelerra/vdevicex11.C index 793047ac..fc9e8409 100644 --- a/cinelerra-5.1/cinelerra/vdevicex11.C +++ b/cinelerra-5.1/cinelerra/vdevicex11.C @@ -95,31 +95,28 @@ int VDeviceX11::open_input() // create overlay device->mwindow->gui->lock_window("VDeviceX11::close_all"); - screencap_border[0] = new BC_Popup(device->mwindow->gui, + screencap_border[0] = new BC_Popup(device->mwindow->gui, device->input_x - SCREENCAP_PIXELS, device->input_y - SCREENCAP_PIXELS, device->in_config->w + SCREENCAP_PIXELS * 2, SCREENCAP_PIXELS, SCREENCAP_COLOR, 1); - screencap_border[1] = new BC_Popup(device->mwindow->gui, + screencap_border[1] = new BC_Popup(device->mwindow->gui, device->input_x - SCREENCAP_PIXELS, device->input_y, SCREENCAP_PIXELS, device->in_config->h, SCREENCAP_COLOR, 1); - screencap_border[2] = new BC_Popup(device->mwindow->gui, + screencap_border[2] = new BC_Popup(device->mwindow->gui, device->input_x - SCREENCAP_PIXELS, device->input_y + device->in_config->h, device->in_config->w + SCREENCAP_PIXELS * 2, SCREENCAP_PIXELS, SCREENCAP_COLOR, 1); - screencap_border[3] = new BC_Popup(device->mwindow->gui, + screencap_border[3] = new BC_Popup(device->mwindow->gui, device->input_x + device->in_config->w, device->input_y, SCREENCAP_PIXELS, device->in_config->h, SCREENCAP_COLOR, 1); +usleep(500000); // avoids a bug in gnome-shell 2017/10/19 - for( int i=0; iset_bg_color(SCREENCAP_COLOR); - box->clear_box(0, 0, box->get_w(), box->get_h()); - box->flash(0); - box->show_window(); - } + for( int i=0; ishow_window(0); + device->mwindow->gui->flush(); device->mwindow->gui->unlock_window(); return 0; @@ -164,12 +161,20 @@ int VDeviceX11::close_all() if( output ) { output->lock_canvas("VDeviceX11::close_all 1"); output->get_canvas()->lock_window("VDeviceX11::close_all 1"); +// Update the status bug + if( !device->single_frame ) { + output->stop_video(); + } + else { + output->stop_single(); + } } if( output && output_frame ) { output->update_refresh(device, output_frame); - if( device->single_frame ) - output->draw_refresh(); +// if the last frame is good, don't draw over it + if( output->need_overlays() ) + output->draw_refresh(1); } delete bitmap; bitmap = 0; @@ -177,14 +182,6 @@ int VDeviceX11::close_all() delete capture_bitmap; capture_bitmap = 0; if( output ) { -// Update the status bug - if( !device->single_frame ) { - output->stop_video(); - } - else { - output->stop_single(); - } - output->get_canvas()->unlock_window(); output->unlock_canvas(); } @@ -239,11 +236,11 @@ int VDeviceX11::get_display_colormodel(int file_colormodel) if( device->out_config->driver == PLAYBACK_X11_GL ) { if( file_colormodel == BC_RGB888 || - file_colormodel == BC_RGBA8888 || - file_colormodel == BC_YUV888 || - file_colormodel == BC_YUVA8888 || - file_colormodel == BC_RGB_FLOAT || - file_colormodel == BC_RGBA_FLOAT ) { + file_colormodel == BC_RGBA8888 || + file_colormodel == BC_YUV888 || + file_colormodel == BC_YUVA8888 || + file_colormodel == BC_RGB_FLOAT || + file_colormodel == BC_RGBA_FLOAT ) { return file_colormodel; } @@ -260,13 +257,6 @@ int VDeviceX11::get_display_colormodel(int file_colormodel) } } -// 2 more colormodels are supported by OpenGL - if( device->out_config->driver == PLAYBACK_X11_GL ) { - if( file_colormodel == BC_RGB_FLOAT || - file_colormodel == BC_RGBA_FLOAT ) - result = file_colormodel; - } - if( result < 0 ) { switch( file_colormodel ) { case BC_RGB888: