Skip to content

Commit bb963fb

Browse files
authored
protocols/cursor-shape: impl version 2 (#12270)
1 parent f11cf6f commit bb963fb

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/helpers/CursorShapes.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <array>
44

55
// clang-format off
6-
constexpr std::array<const char*, 35> CURSOR_SHAPE_NAMES = {
6+
constexpr std::array<const char*, 37> CURSOR_SHAPE_NAMES = {
77
"invalid",
88
"default",
99
"context-menu",
@@ -39,5 +39,7 @@ constexpr std::array<const char*, 35> CURSOR_SHAPE_NAMES = {
3939
"all-scroll",
4040
"zoom-in",
4141
"zoom-out",
42+
"dnd-ask",
43+
"all-resize"
4244
};
4345
// clang-format on

src/managers/ProtocolManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ CProtocolManager::CProtocolManager() {
150150
PROTO::tearing = makeUnique<CTearingControlProtocol>(&wp_tearing_control_manager_v1_interface, 1, "TearingControl");
151151
PROTO::fractional = makeUnique<CFractionalScaleProtocol>(&wp_fractional_scale_manager_v1_interface, 1, "FractionalScale");
152152
PROTO::xdgOutput = makeUnique<CXDGOutputProtocol>(&zxdg_output_manager_v1_interface, 3, "XDGOutput");
153-
PROTO::cursorShape = makeUnique<CCursorShapeProtocol>(&wp_cursor_shape_manager_v1_interface, 1, "CursorShape");
153+
PROTO::cursorShape = makeUnique<CCursorShapeProtocol>(&wp_cursor_shape_manager_v1_interface, 2, "CursorShape");
154154
PROTO::idleInhibit = makeUnique<CIdleInhibitProtocol>(&zwp_idle_inhibit_manager_v1_interface, 1, "IdleInhibit");
155155
PROTO::relativePointer = makeUnique<CRelativePointerProtocol>(&zwp_relative_pointer_manager_v1_interface, 1, "RelativePointer");
156156
PROTO::xdgDecoration = makeUnique<CXDGDecorationProtocol>(&zxdg_decoration_manager_v1_interface, 1, "XDGDecoration");

src/managers/XCursorManager.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,10 @@ std::string CXCursorManager::getLegacyShapeName(std::string const& shape) {
396396
return "left_ptr";
397397
else if (shape == "zoom-out")
398398
return "left_ptr";
399+
else if (shape == "dnd-ask")
400+
return "dnd-copy";
401+
else if (shape == "all-resize")
402+
return "fleur";
399403

400404
return std::string();
401405
};

0 commit comments

Comments
 (0)