mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +00: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:
committed by
Andreas Kling
parent
030f4150b8
commit
c50f258b7a
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user