Add an OS.is_window_focused() getter
This makes it possible to know whether the window is focused at a given time, without having to track the focus state manually using `NOTIFICATION_WM_FOCUS_IN` and `NOTIFICATION_WM_FOCUS_OUT`. This partially addresses #33928.
This commit is contained in:
@ -217,6 +217,7 @@ public:
|
||||
virtual bool is_window_maximized() const { return true; }
|
||||
virtual void set_window_always_on_top(bool p_enabled) {}
|
||||
virtual bool is_window_always_on_top() const { return false; }
|
||||
virtual bool is_window_focused() const { return true; }
|
||||
virtual void set_console_visible(bool p_enabled) {}
|
||||
virtual bool is_console_visible() const { return false; }
|
||||
virtual void request_attention() {}
|
||||
|
||||
Reference in New Issue
Block a user