mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-12-01 12:06:36 +00:00
protocols/cursor-shape: impl version 2 (#12270)
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
constexpr std::array<const char*, 35> CURSOR_SHAPE_NAMES = {
|
constexpr std::array<const char*, 37> CURSOR_SHAPE_NAMES = {
|
||||||
"invalid",
|
"invalid",
|
||||||
"default",
|
"default",
|
||||||
"context-menu",
|
"context-menu",
|
||||||
@ -39,5 +39,7 @@ constexpr std::array<const char*, 35> CURSOR_SHAPE_NAMES = {
|
|||||||
"all-scroll",
|
"all-scroll",
|
||||||
"zoom-in",
|
"zoom-in",
|
||||||
"zoom-out",
|
"zoom-out",
|
||||||
|
"dnd-ask",
|
||||||
|
"all-resize"
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|||||||
@ -150,7 +150,7 @@ CProtocolManager::CProtocolManager() {
|
|||||||
PROTO::tearing = makeUnique<CTearingControlProtocol>(&wp_tearing_control_manager_v1_interface, 1, "TearingControl");
|
PROTO::tearing = makeUnique<CTearingControlProtocol>(&wp_tearing_control_manager_v1_interface, 1, "TearingControl");
|
||||||
PROTO::fractional = makeUnique<CFractionalScaleProtocol>(&wp_fractional_scale_manager_v1_interface, 1, "FractionalScale");
|
PROTO::fractional = makeUnique<CFractionalScaleProtocol>(&wp_fractional_scale_manager_v1_interface, 1, "FractionalScale");
|
||||||
PROTO::xdgOutput = makeUnique<CXDGOutputProtocol>(&zxdg_output_manager_v1_interface, 3, "XDGOutput");
|
PROTO::xdgOutput = makeUnique<CXDGOutputProtocol>(&zxdg_output_manager_v1_interface, 3, "XDGOutput");
|
||||||
PROTO::cursorShape = makeUnique<CCursorShapeProtocol>(&wp_cursor_shape_manager_v1_interface, 1, "CursorShape");
|
PROTO::cursorShape = makeUnique<CCursorShapeProtocol>(&wp_cursor_shape_manager_v1_interface, 2, "CursorShape");
|
||||||
PROTO::idleInhibit = makeUnique<CIdleInhibitProtocol>(&zwp_idle_inhibit_manager_v1_interface, 1, "IdleInhibit");
|
PROTO::idleInhibit = makeUnique<CIdleInhibitProtocol>(&zwp_idle_inhibit_manager_v1_interface, 1, "IdleInhibit");
|
||||||
PROTO::relativePointer = makeUnique<CRelativePointerProtocol>(&zwp_relative_pointer_manager_v1_interface, 1, "RelativePointer");
|
PROTO::relativePointer = makeUnique<CRelativePointerProtocol>(&zwp_relative_pointer_manager_v1_interface, 1, "RelativePointer");
|
||||||
PROTO::xdgDecoration = makeUnique<CXDGDecorationProtocol>(&zxdg_decoration_manager_v1_interface, 1, "XDGDecoration");
|
PROTO::xdgDecoration = makeUnique<CXDGDecorationProtocol>(&zxdg_decoration_manager_v1_interface, 1, "XDGDecoration");
|
||||||
|
|||||||
@ -396,6 +396,10 @@ std::string CXCursorManager::getLegacyShapeName(std::string const& shape) {
|
|||||||
return "left_ptr";
|
return "left_ptr";
|
||||||
else if (shape == "zoom-out")
|
else if (shape == "zoom-out")
|
||||||
return "left_ptr";
|
return "left_ptr";
|
||||||
|
else if (shape == "dnd-ask")
|
||||||
|
return "dnd-copy";
|
||||||
|
else if (shape == "all-resize")
|
||||||
|
return "fleur";
|
||||||
|
|
||||||
return std::string();
|
return std::string();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user