auto load project only when project is not specified; fix alt menu weirdness on alt+tab

This commit is contained in:
Ryan Fleury
2026-06-03 09:10:53 -07:00
parent 4d1d362ac1
commit e7153e8910
3 changed files with 5 additions and 4 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -314,7 +314,7 @@ RD_VocabTable:
'transient_tabs': bool,
//- rjf: auto-load last project
@default(0) @display_name('Auto Load Last Project') @description("Enables loading the most recently opened project when a user file is loaded (and thus when the debugger starts).")
@default(0) @display_name('Auto Load Last Project') @description("Enables loading the most recently opened project, if one is not specified from the command line.")
'auto_load_last_project': bool,
}
```
+3 -2
View File
@@ -5143,6 +5143,7 @@ rd_window_frame(void)
if(!window_is_focused || popup_is_open)
{
ws->menu_bar_key_held = 0;
ws->menu_bar_focus_press_started = 0;
}
ws->window_temporarily_focused_ipc = 0;
ui_select_state(ws->ui);
@@ -11358,7 +11359,7 @@ rd_frame(void)
}
//- rjf: try menu bar operations
if(rd_state->alt_menu_bar_enabled)
if(rd_state->alt_menu_bar_enabled && wm_window_is_focused(ws->os))
{
if(!take && event->kind == WM_EventKind_Press && event->key == WM_Key_Alt && event->modifiers == 0 && event->is_repeat == 0)
{
@@ -13283,7 +13284,7 @@ rd_frame(void)
}
//- rjf: if just opened user -> load last project, if enabled
if(kind == RD_CmdKind_OpenUser && rd_setting_b32_from_name(s("auto_load_last_project")))
if(kind == RD_CmdKind_OpenUser && rd_setting_b32_from_name(s("auto_load_last_project")) && rd_state->project_path.size == 0)
{
CFG_Node *user = cfg_node_child_from_string(cfg_node_root(), s("user"));
CFG_NodePtrList recent_projects = cfg_node_child_list_from_string(scratch.arena, user, s("recent_project"));