mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 02:38:11 +00:00
WindowServer: Give the desktop window the whole exact desktop rect
This commit is contained in:
parent
3d31f2e44b
commit
95805c0e56
3 changed files with 14 additions and 1 deletions
|
@ -447,7 +447,7 @@ OwnPtr<Messages::WindowServer::CreateWindowResponse> ClientConnection::handle(co
|
||||||
if (!message.fullscreen())
|
if (!message.fullscreen())
|
||||||
window->set_rect(message.rect());
|
window->set_rect(message.rect());
|
||||||
if (window->type() == WindowType::Desktop) {
|
if (window->type() == WindowType::Desktop) {
|
||||||
window->set_rect(Screen::the().rect());
|
window->set_rect(WindowManager::the().desktop_rect());
|
||||||
window->recalculate_rect();
|
window->recalculate_rect();
|
||||||
}
|
}
|
||||||
window->set_show_titlebar(message.show_titlebar());
|
window->set_show_titlebar(message.show_titlebar());
|
||||||
|
|
|
@ -936,6 +936,18 @@ Gfx::Rect WindowManager::menubar_rect() const
|
||||||
return MenuManager::the().menubar_rect();
|
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)
|
void WindowManager::event(Core::Event& event)
|
||||||
{
|
{
|
||||||
if (static_cast<Event&>(event).is_mouse_event()) {
|
if (static_cast<Event&>(event).is_mouse_event()) {
|
||||||
|
|
|
@ -119,6 +119,7 @@ public:
|
||||||
void move_to_front_and_make_active(Window&);
|
void move_to_front_and_make_active(Window&);
|
||||||
|
|
||||||
Gfx::Rect menubar_rect() const;
|
Gfx::Rect menubar_rect() const;
|
||||||
|
Gfx::Rect desktop_rect() const;
|
||||||
|
|
||||||
const Cursor& active_cursor() const;
|
const Cursor& active_cursor() const;
|
||||||
const Cursor& arrow_cursor() const { return *m_arrow_cursor; }
|
const Cursor& arrow_cursor() const { return *m_arrow_cursor; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue