1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:07:35 +00:00

WindowServer+LibGUI: Make window creation asynchronous :^)

Let clients manage their own window ID's. If you try to create a new
window with an existing ID, WindowServer will simply disconnect you
for misbehaving.

This removes the need for window creation to be synchronous, which
means that most GUI applications can now batch their entire GUI
initialization sequence without having to block waiting for responses.
This commit is contained in:
Andreas Kling 2021-06-12 11:55:13 +02:00
parent 77c2db4183
commit 0a98964600
4 changed files with 17 additions and 10 deletions

View file

@ -97,7 +97,7 @@ private:
virtual void add_menu_item(i32, i32, i32, String const&, bool, bool, bool, bool, String const&, Gfx::ShareableBitmap const&, bool) override;
virtual void add_menu_separator(i32) override;
virtual void update_menu_item(i32, i32, i32, String const&, bool, bool, bool, bool, String const&) override;
virtual Messages::WindowServer::CreateWindowResponse create_window(Gfx::IntRect const&, bool, bool, bool,
virtual void create_window(i32, Gfx::IntRect const&, bool, bool, bool,
bool, bool, bool, bool, bool, float, float, Gfx::IntSize const&, Gfx::IntSize const&, Gfx::IntSize const&,
Optional<Gfx::IntSize> const&, i32, String const&, i32) override;
virtual Messages::WindowServer::DestroyWindowResponse destroy_window(i32) override;
@ -163,8 +163,6 @@ private:
RefPtr<Core::Timer> m_ping_timer;
int m_next_window_id { 1982 };
bool m_has_display_link { false };
bool m_unresponsive { false };