Root: centralize focus(null) calls in applyPending()

This commit is contained in:
Isaac Freund
2023-03-01 10:49:44 +01:00
parent 07154720fa
commit 6411c71151
11 changed files with 21 additions and 39 deletions

View File

@ -138,6 +138,7 @@ pub fn deinit(self: *Self) void {
/// Set the current focus. If a visible view is passed it will be focused.
/// If null is passed, the top view in the stack of the focused output will be focused.
/// Requires a call to Root.applyPending()
pub fn focus(self: *Self, _target: ?*View) void {
var target = _target;