From d8a836e9da3119949264967610f87e7d8649126c Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 22 Nov 2021 13:23:17 +0900 Subject: [PATCH] [input] Add broadcast events for app focus gain/loss These are for when the application itself gains or loses focus, rather than individual event handlers. --- include/QF/input/event.h | 4 ++++ ruamoko/qwaq/builtins/input.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/include/QF/input/event.h b/include/QF/input/event.h index de80c2b16..413685fc9 100644 --- a/include/QF/input/event.h +++ b/include/QF/input/event.h @@ -89,6 +89,8 @@ typedef enum { ie_none, ie_gain_focus, ie_lose_focus, + ie_app_gain_focus, + ie_app_lose_focus, ie_app_window, ie_add_device, ie_remove_device, @@ -103,6 +105,8 @@ typedef enum { #define IE_broadcast_events (0 \ | (1 << ie_add_device) \ | (1 << ie_remove_device) \ + | (1 << ie_app_gain_focus) \ + | (1 << ie_app_lose_focus) \ | (1 << ie_app_window) \ ) diff --git a/ruamoko/qwaq/builtins/input.c b/ruamoko/qwaq/builtins/input.c index 0e7305047..3c2d7a694 100644 --- a/ruamoko/qwaq/builtins/input.c +++ b/ruamoko/qwaq/builtins/input.c @@ -543,6 +543,8 @@ qwaq_input_event_handler (const IE_event_t *ie_event, void *_res) case ie_none: case ie_gain_focus: case ie_lose_focus: + case ie_app_gain_focus: + case ie_app_lose_focus: case ie_app_window: return 0; case ie_add_device: