WindowServer: Add support for fullscreen windows.

Fullscreen windows are rendered alone and above everything else when they
are active, and as part of the regular window stack order when something
else is active.

Currently windows cannot be made fullscreen after-the-fact, but must have
the fullscreen flag included in their CreateWindow message.

It should not possible to interact with the menu, taskbar or window frame
while the active window is fullscreened. :^)
This commit is contained in:
Andreas Kling 2019-05-17 21:33:44 +02:00
parent 5babcac289
commit 33d0916d29
Notes: sideshowbarker 2024-07-19 14:03:02 +09:00
11 changed files with 54 additions and 13 deletions

View file

@ -413,6 +413,10 @@ void WSClientConnection::handle_request(const WSAPISetWindowRectRequest& request
return;
}
auto& window = *(*it).value;
if (window.is_fullscreen()) {
dbgprintf("WSClientConnection: Ignoring SetWindowRect request for fullscreen window\n");
return;
}
window.set_rect(request.rect());
window.request_update(request.rect());
}
@ -474,11 +478,12 @@ void WSClientConnection::handle_request(const WSAPIGetClipboardContentsRequest&)
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(), request.is_resizable());
auto window = make<WSWindow>(*this, request.window_type(), window_id, request.is_modal(), request.is_resizable(), request.is_fullscreen());
window->set_background_color(request.background_color());
window->set_has_alpha_channel(request.has_alpha_channel());
window->set_title(request.title());
window->set_rect(request.rect());
if (!request.is_fullscreen())
window->set_rect(request.rect());
window->set_opacity(request.opacity());
window->set_size_increment(request.size_increment());
window->set_base_size(request.base_size());