mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
WindowServer+LibGUI: Allow specifying a "launch origin" for new windows
The launch_origin_rect parameter to create_window() specifies where on screen the window was launched from. It's optional, but if you provide it, the new window will have a short wireframe animation from the origin to the initial window frame rect. GUI::Window looks for the "__libgui_launch_origin_rect" environment variable. Put your launch origin rect in there with the format "<x>,<y>,<width>,<height>" and the first GUI::Window shown by the app will use that as the launch origin rect. Also it looks pretty neat, although I'm sure we can improve it. :^)
This commit is contained in:
parent
75f870a93f
commit
6a132d8672
6 changed files with 46 additions and 4 deletions
|
@ -101,7 +101,7 @@ private:
|
|||
virtual void update_menu_item(i32, i32, i32, String const&, bool, bool, bool, bool, String const&) override;
|
||||
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;
|
||||
Optional<Gfx::IntSize> const&, i32, String const&, i32, Gfx::IntRect const&) override;
|
||||
virtual Messages::WindowServer::DestroyWindowResponse destroy_window(i32) override;
|
||||
virtual void set_window_title(i32, String const&) override;
|
||||
virtual Messages::WindowServer::GetWindowTitleResponse get_window_title(i32) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue