LibGUI: Window Creation takes attributes as an argument

This reduces windows showing/moving once they are opened and setting
their attributes.
This commit is contained in:
2024-11-14 20:57:34 +02:00
parent 04eee2ea75
commit a859558840
6 changed files with 21 additions and 19 deletions

View File

@@ -67,6 +67,7 @@ void WindowServer::on_window_create(int fd, const LibGUI::WindowPacket::WindowCr
return;
}
window->set_attributes(packet.attributes);
window->set_position({
static_cast<int32_t>((m_framebuffer.width - window->client_width()) / 2),
static_cast<int32_t>((m_framebuffer.height - window->client_height()) / 2),