mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[ui] Reset active widget when UI context is hidden
WIdgets can't possibly be active when the entire UI is hidden, and resetting the active widget when hiding the UI helps when the state gets broken due to widget id conflicts.
This commit is contained in:
parent
24b5066760
commit
d8b59656aa
1 changed files with 3 additions and 0 deletions
|
@ -265,6 +265,9 @@ IMUI_DestroyContext (imui_ctx_t *ctx)
|
|||
void
|
||||
IMUI_SetVisible (imui_ctx_t *ctx, bool visible)
|
||||
{
|
||||
if (!visible) {
|
||||
ctx->active = nullent;
|
||||
}
|
||||
*Canvas_Visible (ctx->csys, ctx->canvas) = visible;
|
||||
for (uint32_t i = 0; i < ctx->windows.size; i++) {
|
||||
*Canvas_Visible (ctx->csys, ctx->windows.a[i]->entity) = visible;
|
||||
|
|
Loading…
Reference in a new issue