apprt/gtk: report proper app focus state

This commit is contained in:
Mitchell Hashimoto
2024-10-06 13:30:53 -07:00
parent e56cfbdc8b
commit 494fedca2f
2 changed files with 88 additions and 1 deletions

View File

@@ -288,6 +288,9 @@ pub fn setQuit(self: *App) !void {
/// This is separate from surface focus events. See the `focused`
/// field for more information.
pub fn focusEvent(self: *App, focused: bool) void {
// Prevent redundant focus events
if (self.focused == focused) return;
log.debug("focus event focused={}", .{focused});
self.focused = focused;
}