mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-16 00:54:19 +00:00
Internals: Shortcut() follow docking chain (until we formalize a more general focus scope stack). (#456)
This commit is contained in:
parent
2dc85e6e43
commit
32a3c61d00
1 changed files with 2 additions and 2 deletions
|
|
@ -8931,7 +8931,7 @@ static int CalcRoutingScore(ImGuiWindow* location, ImGuiID owner_id, ImGuiInputF
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
// Early out when not in focus stack
|
// Early out when not in focus stack
|
||||||
if (focused == NULL || focused->RootWindow != location->RootWindow)
|
if (focused == NULL || focused->RootWindowDockTree != location->RootWindowDockTree)
|
||||||
return 255;
|
return 255;
|
||||||
|
|
||||||
// Score based on distance to focused window (lower is better)
|
// Score based on distance to focused window (lower is better)
|
||||||
|
|
@ -8947,7 +8947,7 @@ static int CalcRoutingScore(ImGuiWindow* location, ImGuiID owner_id, ImGuiInputF
|
||||||
IM_ASSERT(next_score < 255);
|
IM_ASSERT(next_score < 255);
|
||||||
return next_score;
|
return next_score;
|
||||||
}
|
}
|
||||||
focused = (focused->RootWindow != focused) ? focused->ParentWindow : NULL; // FIXME: This could be later abstracted as a focus path
|
focused = (focused->RootWindowDockTree != focused) ? focused->ParentWindow : NULL; // FIXME: This could be later abstracted as a focus path
|
||||||
}
|
}
|
||||||
return 255;
|
return 255;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue