1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 17:55:08 +00:00

WindowServer: Give the desktop window the whole exact desktop rect

This commit is contained in:
Andreas Kling 2020-04-18 21:18:11 +02:00
parent 3d31f2e44b
commit 95805c0e56
3 changed files with 14 additions and 1 deletions

View file

@ -936,6 +936,18 @@ Gfx::Rect WindowManager::menubar_rect() const
return MenuManager::the().menubar_rect();
}
Gfx::Rect WindowManager::desktop_rect() const
{
if (active_fullscreen_window())
return {};
return {
0,
menubar_rect().bottom() + 1,
Screen::the().width(),
Screen::the().height() - menubar_rect().height() - 28
};
}
void WindowManager::event(Core::Event& event)
{
if (static_cast<Event&>(event).is_mouse_event()) {