mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-11 02:05:59 +01:00
fix
This commit is contained in:
parent
cff9b4fdb1
commit
74971816dc
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
#include "CursorShape.hpp"
|
#include "CursorShape.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include "../helpers/CursorShapes.hpp"
|
||||||
|
|
||||||
#define LOGM PROTO::cursorShape->protoLog
|
#define LOGM PROTO::cursorShape->protoLog
|
||||||
|
|
||||||
|
@ -42,7 +43,7 @@ void CCursorShapeProtocol::createCursorShapeDevice(CWpCursorShapeManagerV1* pMgr
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCursorShapeProtocol::onSetShape(CWpCursorShapeDeviceV1* pMgr, uint32_t serial, wpCursorShapeDeviceV1Shape shape) {
|
void CCursorShapeProtocol::onSetShape(CWpCursorShapeDeviceV1* pMgr, uint32_t serial, wpCursorShapeDeviceV1Shape shape) {
|
||||||
if ((uint32_t)shape == 0 || (uint32_t)shape > sizeof(SHAPE_NAMES)) {
|
if ((uint32_t)shape == 0 || (uint32_t)shape > CURSOR_SHAPE_NAMES.size()) {
|
||||||
pMgr->error(WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE, "The shape is invalid");
|
pMgr->error(WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE, "The shape is invalid");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +51,7 @@ void CCursorShapeProtocol::onSetShape(CWpCursorShapeDeviceV1* pMgr, uint32_t ser
|
||||||
SSetShapeEvent event;
|
SSetShapeEvent event;
|
||||||
event.pMgr = pMgr;
|
event.pMgr = pMgr;
|
||||||
event.shape = shape;
|
event.shape = shape;
|
||||||
event.shapeName = SHAPE_NAMES[shape];
|
event.shapeName = CURSOR_SHAPE_NAMES.at(shape);
|
||||||
|
|
||||||
events.setShape.emit(event);
|
events.setShape.emit(event);
|
||||||
}
|
}
|
Loading…
Reference in a new issue