From 7c90c67a71f1171aba02e78586b939514ced1280 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Thu, 16 Mar 2023 18:31:08 +0300 Subject: LibWebView: Generate window handle during client creation Generate handle UUID for top-level context that is going to run in created WebContent process and sent it over IPC. Co-authored-by: Timothy Flynn --- Userland/Libraries/LibWebView/OutOfProcessWebView.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Userland') diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp index 265a426f58..1c6070825f 100644 --- a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp +++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp @@ -19,6 +19,7 @@ #include #include #include +#include REGISTER_WIDGET(WebView, OutOfProcessWebView) @@ -69,6 +70,9 @@ void OutOfProcessWebView::create_client() }); }; + m_client_state.client_handle = Web::Crypto::generate_random_uuid().release_value_but_fixme_should_propagate_errors(); + client().async_set_window_handle(m_client_state.client_handle); + client().async_update_system_theme(Gfx::current_system_theme_buffer()); client().async_update_system_fonts(Gfx::FontDatabase::default_font_query(), Gfx::FontDatabase::fixed_width_font_query(), Gfx::FontDatabase::window_title_font_query()); client().async_update_screen_rects(GUI::Desktop::the().rects(), GUI::Desktop::the().main_screen_index()); -- cgit v1.2.3