diff --git a/Servers/WindowServer/WSWindowManager.cpp b/Servers/WindowServer/WSWindowManager.cpp index 23a8503115e..5c13d7223cb 100644 --- a/Servers/WindowServer/WSWindowManager.cpp +++ b/Servers/WindowServer/WSWindowManager.cpp @@ -1275,3 +1275,27 @@ void WSWindowManager::notify_client_changed_app_menubar(WSClientConnection& clie set_current_menubar(client.app_menubar()); invalidate(menubar_rect()); } + +const WSCursor& WSWindowManager::active_cursor() const +{ + if (m_resize_window) { + switch (m_resize_direction) { + case ResizeDirection::Up: + case ResizeDirection::Down: + return *m_resize_vertically_cursor; + case ResizeDirection::Left: + case ResizeDirection::Right: + return *m_resize_horizontally_cursor; + case ResizeDirection::UpLeft: + case ResizeDirection::DownRight: + return *m_resize_diagonally_tlbr_cursor; + case ResizeDirection::UpRight: + case ResizeDirection::DownLeft: + return *m_resize_diagonally_bltr_cursor; + case ResizeDirection::None: + ASSERT_NOT_REACHED(); + } + } + + return *m_arrow_cursor; +} diff --git a/Servers/WindowServer/WSWindowManager.h b/Servers/WindowServer/WSWindowManager.h index 751ad94f442..e062d658cb1 100644 --- a/Servers/WindowServer/WSWindowManager.h +++ b/Servers/WindowServer/WSWindowManager.h @@ -84,7 +84,7 @@ public: bool set_wallpaper(const String& path); String wallpaper_path() const { return m_wallpaper_path; } - const WSCursor& active_cursor() const { return *m_arrow_cursor; } + const WSCursor& active_cursor() const; Rect current_cursor_rect() const; private: