Recompute focus on view pinning

When sending a view to a different sheet we need to compute the focus, otherwise
an obscured view would not gain focus if it is revealed after the pinning.
This commit is contained in:
raichoo 2020-09-10 08:14:57 +00:00
parent d479591e04
commit 28dc6cb88a
1 changed files with 3 additions and 0 deletions

View File

@ -1226,6 +1226,8 @@ hikari_view_pin_to_sheet(struct hikari_view *view, struct hikari_sheet *sheet)
if (view->sheet->workspace->sheet != sheet && sheet->nr != 0) {
hikari_view_hide(view);
hikari_server_cursor_focus();
move_to_top(view);
} else {
hikari_view_raise(view);
@ -1239,6 +1241,7 @@ hikari_view_pin_to_sheet(struct hikari_view *view, struct hikari_sheet *sheet)
hikari_indicator_damage(&hikari_server.indicator, view);
} else {
hikari_view_hide(view);
hikari_server_cursor_focus();
}
view->sheet = sheet;