mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibGUI: Add on_activity_change function to Window
Reports changes on the active/inactive state of a window.
This commit is contained in:
committed by
Andreas Kling
parent
7739497e34
commit
dc716194c8
@@ -329,6 +329,8 @@ void Window::event(Core::Event& event)
|
||||
|
||||
if (event.type() == Event::WindowBecameActive || event.type() == Event::WindowBecameInactive) {
|
||||
m_is_active = event.type() == Event::WindowBecameActive;
|
||||
if (on_activity_change)
|
||||
on_activity_change(m_is_active);
|
||||
if (m_main_widget)
|
||||
m_main_widget->dispatch_event(event, this);
|
||||
if (m_focused_widget)
|
||||
|
||||
Reference in New Issue
Block a user