1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:58:11 +00:00

WindowServer: Give windows a "background color" to use for missing parts.

When resizing a window, we often end up having to paint some part of it
without coverage in the current backing store. This patch makes those cases
look nicer by having a fallback background color for each window, passed
along with the CreateWindow client message.
This commit is contained in:
Andreas Kling 2019-04-10 14:29:47 +02:00
parent 30e2d62c38
commit d4818dd2dd
9 changed files with 30 additions and 2 deletions

View file

@ -372,6 +372,7 @@ void WSClientConnection::handle_request(const WSAPICreateWindowRequest& request)
{
int window_id = m_next_window_id++;
auto window = make<WSWindow>(*this, request.window_type(), window_id, request.is_modal());
window->set_background_color(request.background_color());
window->set_has_alpha_channel(request.has_alpha_channel());
window->set_resizable(request.is_resizable());
window->set_title(request.title());