refresh frame fix, dblclk proxy viewer fix, vicon refresh fix for awdw resize, fix...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / cwindowgui.C
index d7bcf789f5fc79595be3dc7ce376679f9217e0a1..c51eb0c3d155fc8bcef72a316efbc8521689849d 100644 (file)
@@ -571,6 +571,8 @@ int CWindowGUI::keypress_event()
                case KEY_F8:    cwindow_operation = CWINDOW_EYEDROP;    break;
                case KEY_F9:    cwindow_operation = CWINDOW_TOOL_WINDOW; break;
                case KEY_F10:   cwindow_operation = CWINDOW_TITLESAFE;  break;
+               case KEY_F11:   canvas->reset_camera();                 break;
+               case KEY_F12:   canvas->reset_projector();              break;
        }
 
        if( cwindow_operation >= 0 ) {
@@ -785,7 +787,7 @@ CWrapper_cut(next_edit)
 
 void CWindowEditing::to_clip()
 {
-        mwindow->to_clip(mwindow->edl, _("composer window: "), 0);
+       mwindow->to_clip(mwindow->edl, _("composer window: "), 0);
 }
 
 
@@ -889,20 +891,9 @@ int CWindowSlider::handle_event()
 void CWindowSlider::set_position()
 {
        double new_length = mwindow->edl->tracks->total_length();
-//     if(mwindow->edl->local_session->preview_end <= 0 ||
-//             mwindow->edl->local_session->preview_end > new_length)
-//             mwindow->edl->local_session->preview_end = new_length;
-//     if(mwindow->edl->local_session->preview_start >
-//             mwindow->edl->local_session->preview_end)
-//             mwindow->edl->local_session->preview_start = 0;
-
-
        update(mwindow->theme->cslider_w,
                mwindow->edl->local_session->get_selectionstart(1),
-               0,
-               new_length);
-//             mwindow->edl->local_session->preview_start,
-//             mwindow->edl->local_session->preview_end);
+               0, new_length);
 }
 
 
@@ -1100,12 +1091,13 @@ void CWindowCanvas::draw_refresh(int flush)
                                                (int)out_x1,
                                                (int)out_y1,
                                                (int)(out_x2 - out_x1),
-                                               (int)(out_y2 - out_y1),
-                                               (int)in_x1,
-                                               (int)in_y1,
-                                               (int)(in_x2 - in_x1),
-                                               (int)(in_y2 - in_y1),
-                                               0);
+                                               (int)(out_y2 - out_y1));
+// if refresh_frame session geometry...
+//                                             (int)in_x1,
+//                                             (int)in_y1,
+//                                             (int)(in_x2 - in_x1),
+//                                             (int)(in_y2 - in_y1),
+//                                             0);
                        }
                }
                else
@@ -1117,6 +1109,9 @@ void CWindowCanvas::draw_refresh(int flush)
                }
 
                draw_overlays();
+// allow last opengl write to complete before redraw
+// tried sync_display, glFlush, glxMake*Current(0..)
+usleep(20000);
                get_canvas()->flash(flush);
        }
 //printf("CWindowCanvas::draw_refresh 10\n");
@@ -2565,7 +2560,7 @@ int CWindowCanvas::test_crop(int button_press, int &redraw)
                        redraw = 1;
                }
        }
-    else
+       else
 // Translate all 4 points
        if(gui->current_operation == CWINDOW_CROP && gui->crop_translate)
        {