build tweaks for fc30, glFinish fix
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / trackcanvas.C
index b9dd38841d4c7562a92849b52632ffcdd4457bbb..97fe7a27883eb136660f2466c32ac99180e9f6c7 100644 (file)
@@ -2170,6 +2170,7 @@ int TrackCanvas::do_keyframes(int cursor_x,
                pankeyframe_pixmap,
                modekeyframe_pixmap,
                maskkeyframe_pixmap,
+               0,
        };
 
 
@@ -2468,12 +2469,23 @@ void TrackCanvas::draw_floatauto(FloatAuto *current,
        CLAMP(y1, ymin, ymax);
        CLAMP(y2, ymin, ymax);
 
-       if(y2 - 1 > y1)
-       {
-               set_color(BLACK);
-               draw_box(x1 + 1, y1 + 1, x2 - x1, y2 - y1);
-               set_color(color);
-               draw_box(x1, y1, x2 - x1, y2 - y1);
+       if( y2-1 > y1 ) {
+               if( current->curve_mode == FloatAuto::LINEAR ) {
+                       draw_box(x1, y1, x2 - x1, y2 - y1);
+               }
+               else {
+                       ArrayList<int> polygon_x;
+                       ArrayList<int> polygon_y;
+                       polygon_x.append((x1 + x2) / 2 + 1);
+                       polygon_y.append(y1 + 1);
+                       polygon_x.append(x2 + 1);
+                       polygon_y.append((y1 + y2) / 2 + 1);
+                       polygon_x.append((x1 + x2) / 2 + 1);
+                       polygon_y.append(y2 + 1);
+                       polygon_x.append(x1 + 1);
+                       polygon_y.append((y1 + y2) / 2 + 1);
+                       fill_polygon(&polygon_x, &polygon_y);
+               }
        }
 
 // show bezier control points (only) if this
@@ -3868,7 +3880,6 @@ int TrackCanvas::render_handle_frame(EDL *edl, int64_t pos, int mode)
                delete video_cache;
                mwindow->cwindow->gui->lock_window("TrackCanvas::render_handle_frame 0");
                Canvas *canvas = mwindow->cwindow->gui->canvas;
-               canvas->lock_canvas("TrackCanvas::render_handle_frame 1");
                int w = canvas->w, h = canvas->h, w2 = w/2, h2 = h/2;
                int lx = 0, ly = h2/2, rx = w2, ry = h2/2;
                BC_WindowBase *window = canvas->get_canvas();
@@ -3877,7 +3888,6 @@ int TrackCanvas::render_handle_frame(EDL *edl, int64_t pos, int mode)
                window->draw_vframe(&vlt, lx,ly, w2,h2, 0,0,vlt.get_w(),vlt.get_h());
                window->draw_vframe(&vrt, rx,ry, w2,h2, 0,0,vrt.get_w(),vrt.get_h());
                window->flash(1);
-               canvas->unlock_canvas();
                mwindow->cwindow->gui->unlock_window();
                break; }
        case 1:
@@ -5025,11 +5035,8 @@ int TrackCanvas::do_edits(int cursor_x, int cursor_y, int button_press, int drag
                                                        mwindow->session->drag_group->remove_user();
                                                double start_position = 0;
                                                mwindow->session->drag_group =
-                                                       mwindow->selected_edits_to_clip(0, &start_position,
-                                                               &mwindow->session->drag_group_first_track,
-                                                               mwindow->edl->session->labels_follow_edits,
-                                                               mwindow->edl->session->autos_follow_edits,
-                                                               mwindow->edl->session->plugins_follow_edits);
+                                                       mwindow->edl->selected_edits_to_clip(0, &start_position,
+                                                               &mwindow->session->drag_group_first_track);
                                                if( mwindow->session->drag_group ) {
                                                        mwindow->session->current_operation = DRAG_GROUP;
                                                        mwindow->session->drag_group_position = start_position;
@@ -5322,6 +5329,7 @@ int TrackCanvas::button_press_event()
                                if( do_keyframes(cursor_x, cursor_y,
                                        0, get_buttonpress(), new_cursor,
                                        update_cursor, rerender) ) break;
+                               update_message = 1;
 // Test edit boundaries
                                if( do_edit_handles(cursor_x, cursor_y,
                                        1, rerender, update_overlay, new_cursor,
@@ -5342,7 +5350,6 @@ int TrackCanvas::button_press_event()
 
                                if( do_tracks(cursor_x, cursor_y, 1) ) break;
 
-                               update_message = 1;
                                result = 0;
                        } while(0);
                        else if( ibeam_mode() ) do {
@@ -5358,6 +5365,7 @@ int TrackCanvas::button_press_event()
                                        update_overlay = 1;
                                        break;
                                }
+                               update_message = 1;
 // Test edit boundaries
                                if( do_edit_handles(cursor_x, cursor_y,
                                        1, rerender, update_overlay, new_cursor, update_cursor) ) break;
@@ -5375,7 +5383,6 @@ int TrackCanvas::button_press_event()
                                if( get_buttonpress() != LEFT_BUTTON ) break;
                                rerender = start_selection(position);
                                mwindow->session->current_operation = SELECT_REGION;
-                               update_message = 1;
                                update_cursor = 1;
                        } while(0);
                }
@@ -5471,11 +5478,11 @@ double TrackCanvas::time_visible()
 }
 
 
-void TrackCanvas::show_message(Auto *current, int color, const char *fmt, ...)
+void TrackCanvas::show_message(Auto *current, int box_color, const char *fmt, ...)
 {
        char string[BCTEXTLEN];
        char *cp = string, *ep = cp + sizeof(string)-1;
-       if( color >= 0 ) {
+       if( box_color >= 0 ) {
                cp += snprintf(string, ep-cp, "%-8s ",
                        FloatAuto::curve_name(((FloatAuto*)current)->curve_mode));
        }
@@ -5491,7 +5498,7 @@ void TrackCanvas::show_message(Auto *current, int color, const char *fmt, ...)
        va_start(ap, fmt);
        vsnprintf(cp, ep-cp, fmt, ap);
        va_end(ap);
-       gui->show_message(string, color);
+       gui->show_message(string, -1, box_color);
 }
 
 // Patchbay* TrackCanvas::get_patchbay()