[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.
This commit is contained in:
Bill Currie 2021-11-22 13:23:17 +09:00
parent 3ac6d2aa22
commit d8a836e9da
2 changed files with 6 additions and 0 deletions

View file

@ -89,6 +89,8 @@ typedef enum {
ie_none, ie_none,
ie_gain_focus, ie_gain_focus,
ie_lose_focus, ie_lose_focus,
ie_app_gain_focus,
ie_app_lose_focus,
ie_app_window, ie_app_window,
ie_add_device, ie_add_device,
ie_remove_device, ie_remove_device,
@ -103,6 +105,8 @@ typedef enum {
#define IE_broadcast_events (0 \ #define IE_broadcast_events (0 \
| (1 << ie_add_device) \ | (1 << ie_add_device) \
| (1 << ie_remove_device) \ | (1 << ie_remove_device) \
| (1 << ie_app_gain_focus) \
| (1 << ie_app_lose_focus) \
| (1 << ie_app_window) \ | (1 << ie_app_window) \
) )

View file

@ -543,6 +543,8 @@ qwaq_input_event_handler (const IE_event_t *ie_event, void *_res)
case ie_none: case ie_none:
case ie_gain_focus: case ie_gain_focus:
case ie_lose_focus: case ie_lose_focus:
case ie_app_gain_focus:
case ie_app_lose_focus:
case ie_app_window: case ie_app_window:
return 0; return 0;
case ie_add_device: case ie_add_device: