wdw->stop_video();
}
- int x = subwindow->get_screen_x(0, -1);
- int y = subwindow->get_screen_y(0, -1);
- int w = root_w;
- int h = root_h;
- if( mwindow->screens == 1 && root_w > scr_w0 ) {
- // Xinerama
- if( subwindow->get_x() >= scr_w0 ) {
- // assumes right side is the big one
- w = root_w - scr_w0;
- h = root_h;
- }
- else {
- // use same aspect ratio to compute left height
- w = scr_w0;
- h = (w*root_h) / (root_w-scr_w0);
- }
- }
+ int x, y, w, h;
+ wdw->get_fullscreen_geometry(x, y, w, h);
if( canvas_fullscreen )
{
int Canvas::keypress_event(BC_WindowBase *caller)
{
- int caller_is_canvas = (caller == get_canvas());
int key = caller->get_keypress();
switch( key ) {
case 'f':
stop_fullscreen();
else
start_fullscreen();
- if(!caller_is_canvas) caller->lock_window("Canvas::keypress_event 1");
+ caller->lock_window("Canvas::keypress_event 1");
break;
case ESC:
caller->unlock_window();
if(get_fullscreen())
stop_fullscreen();
- if(!caller_is_canvas) caller->lock_window("Canvas::keypress_event 2");
+ caller->lock_window("Canvas::keypress_event 2");
break;
default:
return 0;
int best_color_model = output_frame->get_color_model();
int use_opengl =
device->out_config->driver == PLAYBACK_X11_GL &&
- output_frame->get_opengl_state() == VFrame::SCREEN;
+ output_frame->get_opengl_state() != VFrame::RAM;
// OpenGL does YUV->RGB in the compositing step
if( use_opengl )
best_color_model = BC_RGB888;
+ int out_w = output_frame->get_w();
+ int out_h = output_frame->get_h();
if( refresh_frame &&
- (refresh_frame->get_w() != device->out_w ||
- refresh_frame->get_h() != device->out_h ||
+ (refresh_frame->get_w() != out_w ||
+ refresh_frame->get_h() != out_h ||
refresh_frame->get_color_model() != best_color_model ) ) {
// x11 direct render uses BC_BGR8888, use tranfer_from to remap
delete refresh_frame; refresh_frame = 0;
if( !refresh_frame ) {
refresh_frame =
- new VFrame(device->out_w, device->out_h, best_color_model);
+ new VFrame(out_w, out_h, best_color_model);
}
if( use_opengl ) {
get_canvas()->lock_window(" Canvas::output_refresh");
}
else
- refresh_frame->transfer_from(output_frame);
+ refresh_frame->copy_from(output_frame);
}
int CanvasOutput::cursor_leave_event()
{
- return canvas->cursor_leave_event_base(this);
+ return canvas->cursor_leave_event_base(canvas->get_canvas());
}
int CanvasOutput::cursor_enter_event()
{
- return canvas->cursor_enter_event_base(this);
+ return canvas->cursor_enter_event_base(canvas->get_canvas());
}
int CanvasOutput::button_press_event()
{
- return canvas->button_press_event_base(this);
+ return canvas->button_press_event_base(canvas->get_canvas());
}
int CanvasOutput::button_release_event()
int CanvasOutput::keypress_event()
{
- return canvas->keypress_event(this);
+ return canvas->keypress_event(canvas->get_canvas());
}