mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 02:30:30 +09:00
LibGUI+WindowServer: Allow applets to retrieve their location
MenuApplet windows can now call rect_in_menubar to return their location in the MenuBar.
This commit is contained in:
parent
030f4150b8
commit
c50f258b7a
Notes:
sideshowbarker
2024-07-19 04:37:24 +09:00
Author: https://github.com/thankyouverycool
Commit: c50f258b7a
Pull-request: https://github.com/SerenityOS/serenity/pull/2875
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/benit8
5 changed files with 21 additions and 0 deletions
|
@ -177,6 +177,12 @@ String Window::title() const
|
|||
return WindowServerConnection::the().send_sync<Messages::WindowServer::GetWindowTitle>(m_window_id)->title();
|
||||
}
|
||||
|
||||
Gfx::IntRect Window::rect_in_menubar() const
|
||||
{
|
||||
ASSERT(m_window_type == WindowType::MenuApplet);
|
||||
return WindowServerConnection::the().send_sync<Messages::WindowServer::GetWindowRectInMenubar>(m_window_id)->rect();
|
||||
}
|
||||
|
||||
Gfx::IntRect Window::rect() const
|
||||
{
|
||||
if (!is_visible())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue