1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 03:47:34 +00:00

WindowServer: Make it possible to turn off window title bars (#88)

Also, Launcher now does not use titlebars.
Only check if titlebar should be shown if the window type works with that.
This commit is contained in:
Christopher Dumas 2019-05-24 14:37:23 -07:00 committed by Andreas Kling
parent cb9134a2ca
commit 957f8b84f2
9 changed files with 54 additions and 11 deletions

View file

@ -114,6 +114,7 @@ static WSWindowType from_api(WSAPI_WindowType api_type)
case WSAPI_WindowType::Tooltip:
return WSWindowType::Tooltip;
default:
dbgprintf("Unknown WSAPI_WindowType: %d\n", api_type);
ASSERT_NOT_REACHED();
}
}
@ -206,7 +207,20 @@ bool WSEventLoop::on_receive_from_client(int client_id, const WSAPI_ClientMessag
client.did_misbehave();
return false;
}
post_event(client, make<WSAPICreateWindowRequest>(client_id, message.window.rect, String(message.text, message.text_length), message.window.has_alpha_channel, message.window.modal, message.window.resizable, message.window.fullscreen, message.window.opacity, message.window.base_size, message.window.size_increment, from_api(message.window.type), Color::from_rgba(message.window.background_color)));
post_event(client,
make<WSAPICreateWindowRequest>(client_id,
message.window.rect,
String(message.text, message.text_length),
message.window.has_alpha_channel,
message.window.modal,
message.window.resizable,
message.window.fullscreen,
message.window.show_titlebar,
message.window.opacity,
message.window.base_size,
message.window.size_increment,
from_api(message.window.type),
Color::from_rgba(message.window.background_color)));
break;
case WSAPI_ClientMessage::Type::DestroyWindow:
post_event(client, make<WSAPIDestroyWindowRequest>(client_id, message.window_id));