mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
WindowServer: Support resizing windows.
This is pretty limited and not entirely stable, but it does work! :^)
This commit is contained in:
parent
a9911fca80
commit
59b8183c4b
11 changed files with 112 additions and 13 deletions
|
@ -48,7 +48,6 @@ void WSWindow::set_rect(const Rect& rect)
|
|||
else if (m_client) {
|
||||
m_backing = m_client->create_shared_bitmap(m_has_alpha_channel ? GraphicsBitmap::Format::RGBA32 : GraphicsBitmap::Format::RGB32, m_rect.size());
|
||||
}
|
||||
|
||||
}
|
||||
WSWindowManager::the().notify_rect_changed(*this, old_rect, rect);
|
||||
}
|
||||
|
@ -125,6 +124,11 @@ void WSWindow::on_message(WSMessage& message)
|
|||
case WSMessage::WindowCloseRequest:
|
||||
server_message.type = WSAPI_ServerMessage::Type::WindowCloseRequest;
|
||||
break;
|
||||
case WSMessage::WindowResized:
|
||||
server_message.type = WSAPI_ServerMessage::Type::WindowResized;
|
||||
server_message.window.old_rect = static_cast<WSResizeEvent&>(message).old_rect();
|
||||
server_message.window.rect = static_cast<WSResizeEvent&>(message).rect();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue