summaryrefslogtreecommitdiff
path: root/Servers
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-31 22:42:13 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-03-31 22:42:13 +0200
commit42c95959a8ea883669491499d8d890881ff20031 (patch)
treec22c0deb9d7ede3bb34e6fb315e8bd4ed59cee23 /Servers
parentaf09f994baf9d234c194e6697fd5b45f35314acc (diff)
downloadserenity-42c95959a8ea883669491499d8d890881ff20031.zip
WindowServer: Show a special "move" cursor when dragging windows around.
Diffstat (limited to 'Servers')
-rw-r--r--Servers/WindowServer/WSWindowManager.cpp4
-rw-r--r--Servers/WindowServer/WSWindowManager.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/Servers/WindowServer/WSWindowManager.cpp b/Servers/WindowServer/WSWindowManager.cpp
index 3db3b59d68..f46b6732ad 100644
--- a/Servers/WindowServer/WSWindowManager.cpp
+++ b/Servers/WindowServer/WSWindowManager.cpp
@@ -167,6 +167,7 @@ WSWindowManager::WSWindowManager()
m_resize_diagonally_bltr_cursor = WSCursor::create(*GraphicsBitmap::load_from_file("/res/cursors/resize-diagonal-bltr.png"));
m_i_beam_cursor = WSCursor::create(*GraphicsBitmap::load_from_file("/res/cursors/i-beam.png"));
m_disallowed_cursor = WSCursor::create(*GraphicsBitmap::load_from_file("/res/cursors/disallowed.png"));
+ m_move_cursor = WSCursor::create(*GraphicsBitmap::load_from_file("/res/cursors/move.png"));
m_wallpaper_path = "/res/wallpapers/retro.rgb";
m_wallpaper = GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, m_wallpaper_path, { 1024, 768 });
@@ -1238,6 +1239,9 @@ void WSWindowManager::notify_client_changed_app_menubar(WSClientConnection& clie
const WSCursor& WSWindowManager::active_cursor() const
{
+ if (m_drag_window)
+ return *m_move_cursor;
+
if (m_resize_window) {
switch (m_resize_direction) {
case ResizeDirection::Up:
diff --git a/Servers/WindowServer/WSWindowManager.h b/Servers/WindowServer/WSWindowManager.h
index e062d658cb..84bcb990e6 100644
--- a/Servers/WindowServer/WSWindowManager.h
+++ b/Servers/WindowServer/WSWindowManager.h
@@ -164,6 +164,7 @@ private:
RetainPtr<WSCursor> m_resize_diagonally_bltr_cursor;
RetainPtr<WSCursor> m_i_beam_cursor;
RetainPtr<WSCursor> m_disallowed_cursor;
+ RetainPtr<WSCursor> m_move_cursor;
OwnPtr<Painter> m_back_painter;
OwnPtr<Painter> m_front_painter;