X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fvicon.C;h=2bfedd9277b9a1465091361adafa7e1c757689a0;hb=b402ed7f93de4c98e6651483eb8561cf1c37ec9a;hp=031e9530c2b9c0bb5c22481efed7811e41b9bbe9;hpb=418e8644335db47143bc421f11be2c2e68901d45;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/guicast/vicon.C b/cinelerra-5.1/guicast/vicon.C index 031e9530..2bfedd92 100644 --- a/cinelerra-5.1/guicast/vicon.C +++ b/cinelerra-5.1/guicast/vicon.C @@ -175,9 +175,15 @@ void ViewPopup::draw_vframe(VFrame *frame) ViewPopup *VIconThread::new_view_window(VFrame *frame) { - int wx = viewing->get_vx() - view_w, rx = 0; - int wy = viewing->get_vy() - view_h, ry = 0; - wdw->get_root_coordinates(wx, wy, &rx, &ry); + BC_WindowBase *parent = wdw->get_parent(); + XineramaScreenInfo *info = parent->get_xinerama_info(-1); + int cx = info ? info->x_org + info->width/2 : parent->get_root_w(0)/2; + int cy = info ? info->y_org + info->height/2 : parent->get_root_h(0)/2; + int vx = viewing->get_vx(), rx = 0; + int vy = viewing->get_vy(), ry = 0; + wdw->get_root_coordinates(vx, vy, &rx, &ry); + rx += (rx >= cx ? -view_w : viewing->vw); + ry += (ry >= cy ? -view_h : viewing->vh); ViewPopup *vwin = new ViewPopup(this, frame, rx, ry, view_w, view_h); wdw->set_active_subwindow(vwin); return vwin;