From 05c6446c386ef4b665cd92ec87cb123dd9930a79 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 19 Feb 2025 21:53:15 +0100 Subject: [PATCH] Fix #128966: Update Dopesheet playhead in separate window The playhead is redrawn as an overlay, so instead of a full region redraw using `ARegionType.draw()`, at least an overlay only redraw using `ARegion.draw_overlay()` needs to be triggered. Any redrawing within a window is skipped if neither the screen, nor any of its areas or regions are tagged for redraw. So since there are no other areas or regions to be fully redrawn in this window, no redrawing will happen. The screen needs to be tagged for redraw, which will skip most drawing in this case, and just draw the overlays as wanted. Pull Request: https://projects.blender.org/blender/blender/pulls/134579 --- source/blender/editors/screen/screen_ops.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/screen/screen_ops.cc b/source/blender/editors/screen/screen_ops.cc index 0993687ce4b..60dcf5dfa28 100644 --- a/source/blender/editors/screen/screen_ops.cc +++ b/source/blender/editors/screen/screen_ops.cc @@ -5554,7 +5554,7 @@ static int screen_animation_step_invoke(bContext *C, wmOperator * /*op*/, const } LISTBASE_FOREACH (wmWindow *, window, &wm->windows) { - const bScreen *win_screen = WM_window_get_active_screen(window); + bScreen *win_screen = WM_window_get_active_screen(window); LISTBASE_FOREACH (ScrArea *, area, &win_screen->areabase) { LISTBASE_FOREACH (ARegion *, region, &area->regionbase) { @@ -5573,6 +5573,9 @@ static int screen_animation_step_invoke(bContext *C, wmOperator * /*op*/, const if (redraw) { screen_animation_region_tag_redraw( C, area, region, scene, eScreen_Redraws_Flag(sad->redraws)); + /* Doesn't trigger a full redraw of the screeen but makes sure at least overlay drawing + * (#ARegionType.draw_overlay()) is triggered, which is how the playhead is drawn. */ + win_screen->do_draw = true; } } }