From 4717d645d3112967e6e7da1dbc5d5409f8312fb2 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Thu, 16 Mar 2023 18:35:19 +0300 Subject: [PATCH] Ladybird: 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 --- Ladybird/WebContentView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Ladybird/WebContentView.cpp b/Ladybird/WebContentView.cpp index f6394145bf..6281e2b6d7 100644 --- a/Ladybird/WebContentView.cpp +++ b/Ladybird/WebContentView.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -630,6 +631,9 @@ void WebContentView::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_set_device_pixels_per_css_pixel(m_device_pixel_ratio); update_palette(); client().async_update_system_fonts(Gfx::FontDatabase::default_font_query(), Gfx::FontDatabase::fixed_width_font_query(), Gfx::FontDatabase::window_title_font_query());