summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2022-06-20 11:37:22 +0200
committerSam Atkins <atkinssj@gmail.com>2022-08-31 17:29:44 +0100
commite5674d9666527e1a1be935aeb0051fdd0184a391 (patch)
treefdd50c7f155062d641e89f6ddbe445cd7a0135c0 /Userland/Services
parent06102ff9afdfff4478a0fd1a4b021b391976cc8d (diff)
downloadserenity-e5674d9666527e1a1be935aeb0051fdd0184a391.zip
Base+WindowServer+LibGfx: Add new DragCopy Cursor
The purpose of this cursor is to indicate if a current dragged object (file, Spreadsheet cell) can be dropped onto a widget.
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/WindowServer/Cursor.cpp2
-rw-r--r--Userland/Services/WindowServer/WindowManager.cpp1
-rw-r--r--Userland/Services/WindowServer/WindowManager.h2
3 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Services/WindowServer/Cursor.cpp b/Userland/Services/WindowServer/Cursor.cpp
index 7f16bc36db..15037b0d8f 100644
--- a/Userland/Services/WindowServer/Cursor.cpp
+++ b/Userland/Services/WindowServer/Cursor.cpp
@@ -103,6 +103,8 @@ RefPtr<Cursor> Cursor::create(Gfx::StandardCursor standard_cursor)
return WindowManager::the().help_cursor();
case Gfx::StandardCursor::Drag:
return WindowManager::the().drag_cursor();
+ case Gfx::StandardCursor::DragCopy:
+ return WindowManager::the().drag_copy_cursor();
case Gfx::StandardCursor::Move:
return WindowManager::the().move_cursor();
case Gfx::StandardCursor::Wait:
diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp
index c71818c83b..f4d7f674a1 100644
--- a/Userland/Services/WindowServer/WindowManager.cpp
+++ b/Userland/Services/WindowServer/WindowManager.cpp
@@ -2278,6 +2278,7 @@ void WindowManager::apply_cursor_theme(String const& theme_name)
reload_cursor(m_disallowed_cursor, "Disallowed");
reload_cursor(m_move_cursor, "Move");
reload_cursor(m_drag_cursor, "Drag");
+ reload_cursor(m_drag_copy_cursor, "DragCopy");
reload_cursor(m_wait_cursor, "Wait");
reload_cursor(m_crosshair_cursor, "Crosshair");
reload_cursor(m_eyedropper_cursor, "Eyedropper");
diff --git a/Userland/Services/WindowServer/WindowManager.h b/Userland/Services/WindowServer/WindowManager.h
index 2b88379074..9d532d8215 100644
--- a/Userland/Services/WindowServer/WindowManager.h
+++ b/Userland/Services/WindowServer/WindowManager.h
@@ -149,6 +149,7 @@ public:
Cursor const& disallowed_cursor() const { return *m_disallowed_cursor; }
Cursor const& move_cursor() const { return *m_move_cursor; }
Cursor const& drag_cursor() const { return *m_drag_cursor; }
+ Cursor const& drag_copy_cursor() const { return *m_drag_copy_cursor; }
Cursor const& wait_cursor() const { return *m_wait_cursor; }
Cursor const& eyedropper_cursor() const { return *m_eyedropper_cursor; }
Cursor const& zoom_cursor() const { return *m_zoom_cursor; }
@@ -390,6 +391,7 @@ private:
RefPtr<Cursor> m_disallowed_cursor;
RefPtr<Cursor> m_move_cursor;
RefPtr<Cursor> m_drag_cursor;
+ RefPtr<Cursor> m_drag_copy_cursor;
RefPtr<Cursor> m_wait_cursor;
RefPtr<Cursor> m_crosshair_cursor;
RefPtr<Cursor> m_eyedropper_cursor;