X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fawindowgui.C;h=45954b76ca596053cc8a886aa714d56b708d2418;hp=5756453c95909b92be6acaba48078e253e95d626;hb=24d62aadcd7a6188aff573aaec22f31e3bba4a57;hpb=8a2d79c16c6793d7d3483e9a74205569228ca0cc diff --git a/cinelerra-5.1/cinelerra/awindowgui.C b/cinelerra-5.1/cinelerra/awindowgui.C index 5756453c..45954b76 100644 --- a/cinelerra-5.1/cinelerra/awindowgui.C +++ b/cinelerra-5.1/cinelerra/awindowgui.C @@ -331,7 +331,7 @@ int AssetViewPopup::button_press_event() int dir = 1, button = get_buttonpress(); switch( button ) { case WHEEL_DOWN: dir = -1; // fall thru - case WHEEL_UP: return zoom_scale(dir); + case WHEEL_UP: return avt->zoom_scale(dir); case LEFT_BUTTON: break; default: @@ -547,10 +547,22 @@ AssetVIconThread::AssetVIconThread(AWindowGUI *gui, Preferences *preferences) case VICON_COLOR_MODE_HIGH: vicon_cmodel = BC_RGB888; break; } this->vicon_cmodel = vicon_cmodel; + this->draw_lock = new Mutex("AssetVIconThread::draw_lock"); } AssetVIconThread::~AssetVIconThread() { + delete draw_lock; +} + +void AssetVIconThread::drawing_started() +{ + draw_lock->lock("AssetVIconThread::drawing_started"); +} + +void AssetVIconThread::drawing_stopped() +{ + draw_lock->unlock(); } void AssetVIconThread::set_view_popup(AssetVIcon *v, int draw_mode) @@ -573,8 +585,8 @@ ViewPopup *AssetVIconThread::new_view_window() 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->w); - ry += (ry >= cy ? -view_h : viewing->h); + rx += (rx >= cx ? -view_w+viewing->w/4 : viewing->w-viewing->w/4); + ry += (ry >= cy ? -view_h+viewing->h/4 : viewing->h-viewing->h/4); AssetViewPopup *popup = new AssetViewPopup(this, draw_mode, rx, ry, view_w, view_h); if( draw_mode == ASSET_VIEW_MEDIA_MAP ) @@ -2570,7 +2582,7 @@ int AWindowAssets::button_press_event() case WHEEL_UP: { int x = get_cursor_x(), y = get_cursor_y(); if( avt->cursor_inside(x, y) && avt->view_win ) - return avt->view_win->zoom_scale(dir); + return avt->zoom_scale(dir); return 1; } } }