File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -447,7 +447,7 @@ OwnPtr<Messages::WindowServer::CreateWindowResponse> ClientConnection::handle(co
447
447
if (!message.fullscreen ())
448
448
window->set_rect (message.rect ());
449
449
if (window->type () == WindowType::Desktop) {
450
- window->set_rect (Screen ::the ().rect ());
450
+ window->set_rect (WindowManager ::the ().desktop_rect ());
451
451
window->recalculate_rect ();
452
452
}
453
453
window->set_show_titlebar (message.show_titlebar ());
Original file line number Diff line number Diff line change @@ -936,6 +936,18 @@ Gfx::Rect WindowManager::menubar_rect() const
936
936
return MenuManager::the ().menubar_rect ();
937
937
}
938
938
939
+ Gfx::Rect WindowManager::desktop_rect () const
940
+ {
941
+ if (active_fullscreen_window ())
942
+ return {};
943
+ return {
944
+ 0 ,
945
+ menubar_rect ().bottom () + 1 ,
946
+ Screen::the ().width (),
947
+ Screen::the ().height () - menubar_rect ().height () - 28
948
+ };
949
+ }
950
+
939
951
void WindowManager::event (Core::Event& event)
940
952
{
941
953
if (static_cast <Event&>(event).is_mouse_event ()) {
Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ class WindowManager : public Core::Object {
119
119
void move_to_front_and_make_active (Window&);
120
120
121
121
Gfx::Rect menubar_rect () const ;
122
+ Gfx::Rect desktop_rect () const ;
122
123
123
124
const Cursor& active_cursor () const ;
124
125
const Cursor& arrow_cursor () const { return *m_arrow_cursor; }
You can’t perform that action at this time.
0 commit comments