mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
LibWeb+WebContent+Browser: Plumb visibility state from GUI to web pages
OOPWV now reacts to show/hide events and informs LibWeb about the state change. This makes visibilitychange events fire when switching tabs. :^)
This commit is contained in:
@@ -540,4 +540,14 @@ void OutOfProcessWebView::focusout_event(GUI::FocusEvent&)
|
||||
client().async_set_has_focus(false);
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::show_event(GUI::ShowEvent&)
|
||||
{
|
||||
client().async_set_system_visibility_state(true);
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::hide_event(GUI::HideEvent&)
|
||||
{
|
||||
client().async_set_system_visibility_state(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user