mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-25 21:14:59 -07:00
press in view content -> steal focus from query bar
This commit is contained in:
@@ -2660,6 +2660,7 @@ rd_view_ui(Rng2F32 rect)
|
||||
if(ui_pressed(sig))
|
||||
{
|
||||
vs->query_is_open = 1;
|
||||
vs->contents_are_focused = 0;
|
||||
rd_cmd(RD_CmdKind_FocusPanel);
|
||||
}
|
||||
}
|
||||
@@ -5391,6 +5392,16 @@ rd_view_ui(Rng2F32 rect)
|
||||
RD_ViewUIRule *view_ui_rule = rd_view_ui_rule_from_string(view_name);
|
||||
E_Eval expr_eval = e_eval_from_string(expr_string);
|
||||
|
||||
// rjf: peek presses, steal focus from query bar
|
||||
for(UI_Event *evt = 0; ui_next_event(&evt);)
|
||||
{
|
||||
if(evt->kind == UI_EventKind_Press && contains_2f32(rect, evt->pos))
|
||||
{
|
||||
vs->contents_are_focused = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: 'pull out' button, if floating
|
||||
if(view_is_floating)
|
||||
{
|
||||
@@ -14992,6 +15003,7 @@ rd_frame(void)
|
||||
{
|
||||
vs->query_is_open = 1;
|
||||
}
|
||||
vs->contents_are_focused = 0;
|
||||
}
|
||||
}break;
|
||||
case RD_CmdKind_CompleteQuery:
|
||||
|
||||
Reference in New Issue
Block a user