Fixed #55 with `zr_window_set_focus` not working
While setting a window to active `zr_window_set_focus` did not transfer the window on top of the window stack. This wrong behavior should now be fixed and do what it is supposed to do.
This commit is contained in:
parent
8159391640
commit
4c9eb66b7d
|
@ -8136,6 +8136,10 @@ zr_window_set_focus(struct zr_context *ctx, const char *name)
|
|||
title_len = (int)zr_strsiz(name);
|
||||
title_hash = zr_murmur_hash(name, (int)title_len, ZR_WINDOW_TITLE);
|
||||
win = zr_find_window(ctx, title_hash);
|
||||
if (ctx->end != win) {
|
||||
zr_remove_window(ctx, win);
|
||||
zr_insert_window(ctx, win);
|
||||
}
|
||||
ctx->active = win;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue