mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWebView+WebContent+UI: Remember the current system visibility state
We will want to re-inform WebContent of the system visibility state when we create a new process after a crash. This changes the IPC to just send the enum value directly, instead of a boolean, so that we can just store that enum value directly on the ViewImplementation class.
This commit is contained in:
parent
c04b14d0cb
commit
83b1db785a
Notes:
github-actions[bot]
2024-11-13 19:37:50 +00:00
Author: https://github.com/trflynn89
Commit: 83b1db785a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2318
11 changed files with 28 additions and 24 deletions
|
@ -54,11 +54,11 @@ HeadlessWebView::HeadlessWebView(Core::AnonymousBuffer theme, Web::DevicePixelSi
|
|||
};
|
||||
|
||||
on_restore_window = [this]() {
|
||||
client().async_set_system_visibility_state(m_client_state.page_index, true);
|
||||
set_system_visibility_state(Web::HTML::VisibilityState::Visible);
|
||||
};
|
||||
|
||||
on_minimize_window = [this]() {
|
||||
client().async_set_system_visibility_state(m_client_state.page_index, false);
|
||||
set_system_visibility_state(Web::HTML::VisibilityState::Hidden);
|
||||
};
|
||||
|
||||
on_maximize_window = [this]() {
|
||||
|
@ -173,11 +173,12 @@ void HeadlessWebView::initialize_client(CreateNewClient create_new_client)
|
|||
client().async_set_window_handle(m_client_state.page_index, m_client_state.client_handle);
|
||||
|
||||
client().async_update_system_theme(m_client_state.page_index, m_theme);
|
||||
client().async_set_system_visibility_state(m_client_state.page_index, true);
|
||||
client().async_set_viewport_size(m_client_state.page_index, viewport_size());
|
||||
client().async_set_window_size(m_client_state.page_index, viewport_size());
|
||||
client().async_update_screen_rects(m_client_state.page_index, { screen_rect }, 0);
|
||||
|
||||
set_system_visibility_state(Web::HTML::VisibilityState::Visible);
|
||||
|
||||
if (Application::chrome_options().allow_popups == WebView::AllowPopups::Yes)
|
||||
client().async_debug_request(m_client_state.page_index, "block-pop-ups"sv, "off"sv);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue