fix interaction register propagation rules on unfocused windows (still propagate if window was last focused)

This commit is contained in:
Ryan Fleury
2024-07-15 09:28:12 -07:00
parent 044e78bea2
commit ebbf927fc1
3 changed files with 17 additions and 2 deletions
+8 -1
View File
@@ -7282,9 +7282,16 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
build_view_ui_function(ws, panel, view, content_rect);
}
//- rjf: fill with per-view states, after the view has a chance to run
{
DF_View *view = df_selected_tab_from_panel(panel);
df_interact_regs()->cursor = view->cursor;
df_interact_regs()->mark = view->mark;
}
//- rjf: pop interaction registers; commit if this is the selected view
DF_InteractRegs *view_regs = df_pop_interact_regs();
if(panel_is_focused)
if(ws->focused_panel == panel)
{
MemoryCopyStruct(df_interact_regs(), view_regs);
}