3
0
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:
Honkazel
2025-11-30 20:05:31 +05:00
committed by GitHub
parent f11cf6f1de
commit bb963fb002
3 changed files with 8 additions and 2 deletions

View File

@ -3,7 +3,7 @@
#include <array>
// clang-format off
constexpr std::array<const char*, 35> CURSOR_SHAPE_NAMES = {
constexpr std::array<const char*, 37> CURSOR_SHAPE_NAMES = {
"invalid",
"default",
"context-menu",
@ -39,5 +39,7 @@ constexpr std::array<const char*, 35> CURSOR_SHAPE_NAMES = {
"all-scroll",
"zoom-in",
"zoom-out",
"dnd-ask",
"all-resize"
};
// clang-format on

View File

@ -150,7 +150,7 @@ CProtocolManager::CProtocolManager() {
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::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::relativePointer = makeUnique<CRelativePointerProtocol>(&zwp_relative_pointer_manager_v1_interface, 1, "RelativePointer");
PROTO::xdgDecoration = makeUnique<CXDGDecorationProtocol>(&zxdg_decoration_manager_v1_interface, 1, "XDGDecoration");

View File

@ -396,6 +396,10 @@ std::string CXCursorManager::getLegacyShapeName(std::string const& shape) {
return "left_ptr";
else if (shape == "zoom-out")
return "left_ptr";
else if (shape == "dnd-ask")
return "dnd-copy";
else if (shape == "all-resize")
return "fleur";
return std::string();
};