mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibGUI+WindowServer: Create and broadcast an event when a window moves
LibWeb's Window object will need to know the OS-level position and size of the GUI::Window for e.g. screenX, screenY, outerWidth, outerHeight. It will also need to know about changes to that data.
This commit is contained in:
committed by
Linus Groh
parent
6b41da0b9e
commit
f7e747b68e
@@ -102,6 +102,12 @@ void ConnectionToWindowServer::window_resized(i32 window_id, Gfx::IntRect const&
|
||||
}
|
||||
}
|
||||
|
||||
void ConnectionToWindowServer::window_moved(i32 window_id, Gfx::IntRect const& new_rect)
|
||||
{
|
||||
if (auto* window = Window::from_window_id(window_id))
|
||||
Core::EventLoop::current().post_event(*window, make<MoveEvent>(new_rect.location()));
|
||||
}
|
||||
|
||||
void ConnectionToWindowServer::window_activated(i32 window_id)
|
||||
{
|
||||
if (auto* window = Window::from_window_id(window_id))
|
||||
|
||||
Reference in New Issue
Block a user