mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-31 23:42:52 +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:
parent
6b41da0b9e
commit
f7e747b68e
Notes:
sideshowbarker
2024-07-17 04:53:55 +09:00
Author: https://github.com/trflynn89
Commit: f7e747b68e
Pull-request: https://github.com/SerenityOS/serenity/pull/15883
Reviewed-by: https://github.com/linusg ✅
7 changed files with 47 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue