fix: update variable names to match hl (#75)

2d6ca96e07
This commit is contained in:
Amadej Kastelic 2025-05-04 17:40:23 +02:00 committed by GitHub
commit 96915b6192
Failed to generate hash of commit
2 changed files with 33 additions and 33 deletions

48
flake.lock generated
View file

@ -20,11 +20,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1744289235, "lastModified": 1745357003,
"narHash": "sha256-ZFkHLdimtFzQACsVVyZkZlfYdj4iNy3PkzXfrwmlse8=", "narHash": "sha256-jYwzQkv1r7HN/4qrAuKp+NR4YYNp2xDrOX5O9YVqkWo=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "c8282f4982b56dfa5e9b9f659809da93f8d37e7a", "rev": "a19cf76ee1a15c1c12083fa372747ce46387289f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -87,11 +87,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742215578, "lastModified": 1745948457,
"narHash": "sha256-zfs71PXVVPEe56WEyNi2TJQPs0wabU4WAlq0XV7GcdE=", "narHash": "sha256-lzTV10FJTCGNtMdgW5YAhCAqezeAzKOd/97HbQK8GTU=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprcursor", "repo": "hyprcursor",
"rev": "2fd36421c21aa87e2fe3bee11067540ae612f719", "rev": "ac903e80b33ba6a88df83d02232483d99f327573",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -145,11 +145,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1745328209, "lastModified": 1746310409,
"narHash": "sha256-eP3x+JNE1T6RjXhimaEnoc4GvNJcyzppW1vpAs287Zg=", "narHash": "sha256-iSyQZMaYjVfr+vb7jO0N9Bh8V9m51ZYUqxWd9BimUpQ=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "241a4935a244f403fa7108259075b04c81ed258f", "rev": "adbae0f74d951e06c575bad3c81a944027dfe413",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -238,11 +238,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1739048983, "lastModified": 1745951494,
"narHash": "sha256-REhTcXq4qs3B3cCDtLlYDz0GZvmsBSh947Ub6pQWGTQ=", "narHash": "sha256-2dModE32doiyQMmd6EDAQeZnz+5LOs6KXyE0qX76WIg=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-qtutils", "repo": "hyprland-qtutils",
"rev": "3504a293c8f8db4127cb0f7cfc1a318ffb4316f8", "rev": "4be1d324faf8d6e82c2be9f8510d299984dfdd2e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -267,11 +267,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1744468525, "lastModified": 1745357019,
"narHash": "sha256-9HySx+EtsbbKlZDlY+naqqOV679VdxP6x6fP3wxDXJk=", "narHash": "sha256-q/C3qj9FWHQenObXuw/nGIT8iIsWFjgmcQYcA+ZfpPs=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprlang",
"rev": "f1000c54d266e6e4e9d646df0774fac5b8a652df", "rev": "397600c42b8d7a443a5b4e92aa15f46650a90f18",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -292,11 +292,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1743950287, "lastModified": 1745975815,
"narHash": "sha256-/6IAEWyb8gC/NKZElxiHChkouiUOrVYNq9YqG0Pzm4Y=", "narHash": "sha256-s3GzsRxBL/N/xYgUXZhQh4t62uR1BN4zxXgWBtJ3lWM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "f2dc70e448b994cef627a157ee340135bd68fbc6", "rev": "05878d9470c9e5cbc8807813f9ec2006627a0ca0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -332,11 +332,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1744932701, "lastModified": 1746141548,
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", "narHash": "sha256-IgBWhX7A2oJmZFIrpRuMnw5RAufVnfvOgHWgIdds+hc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", "rev": "f02fddb8acef29a8b32f10a335d44828d7825b78",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -434,11 +434,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1744644585, "lastModified": 1745871725,
"narHash": "sha256-p0D/e4J6Sv6GSb+9u8OQcVHSE2gPNYB5ygIfGDyEiXQ=", "narHash": "sha256-M24SNc2flblWGXFkGQfqSlEOzAGZnMc9QG3GH4K/KbE=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "be6771e754345f18244fb00aae5c9e5ab21ccc26", "rev": "76bbf1a6b1378e4ab5230bad00ad04bc287c969e",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -21,62 +21,62 @@ typedef void (*origRenderSofwareCursorsFor)(void*, SP<CMonitor>, const Time::ste
inline CFunctionHook* g_pRenderSoftwareCursorsForHook = nullptr; inline CFunctionHook* g_pRenderSoftwareCursorsForHook = nullptr;
void hkRenderSoftwareCursorsFor(void* thisptr, SP<CMonitor> pMonitor, const Time::steady_tp& now, CRegion& damage, std::optional<Vector2D> overridePos, bool forceRender) { void hkRenderSoftwareCursorsFor(void* thisptr, SP<CMonitor> pMonitor, const Time::steady_tp& now, CRegion& damage, std::optional<Vector2D> overridePos, bool forceRender) {
if (isEnabled()) g_pDynamicCursors->renderSoftware((CPointerManager*) thisptr, pMonitor, now, damage, overridePos, forceRender); if (isEnabled()) g_pDynamicCursors->renderSoftware((CPointerManager*) thisptr, pMonitor, now, damage, overridePos, forceRender);
else (*(origRenderSofwareCursorsFor)g_pRenderSoftwareCursorsForHook->m_pOriginal)(thisptr, pMonitor, now, damage, overridePos, forceRender); else (*(origRenderSofwareCursorsFor)g_pRenderSoftwareCursorsForHook->m_original)(thisptr, pMonitor, now, damage, overridePos, forceRender);
} }
typedef void (*origDamageIfSoftware)(void*); typedef void (*origDamageIfSoftware)(void*);
inline CFunctionHook* g_pDamageIfSoftwareHook = nullptr; inline CFunctionHook* g_pDamageIfSoftwareHook = nullptr;
void hkDamageIfSoftware(void* thisptr) { void hkDamageIfSoftware(void* thisptr) {
if (isEnabled()) g_pDynamicCursors->damageSoftware((CPointerManager*) thisptr); if (isEnabled()) g_pDynamicCursors->damageSoftware((CPointerManager*) thisptr);
else (*(origDamageIfSoftware)g_pDamageIfSoftwareHook->m_pOriginal)(thisptr); else (*(origDamageIfSoftware)g_pDamageIfSoftwareHook->m_original)(thisptr);
} }
typedef SP<Aquamarine::IBuffer> (*origRenderHWCursorBuffer)(void*, SP<CPointerManager::SMonitorPointerState>, SP<CTexture>); typedef SP<Aquamarine::IBuffer> (*origRenderHWCursorBuffer)(void*, SP<CPointerManager::SMonitorPointerState>, SP<CTexture>);
inline CFunctionHook* g_pRenderHWCursorBufferHook = nullptr; inline CFunctionHook* g_pRenderHWCursorBufferHook = nullptr;
SP<Aquamarine::IBuffer> hkRenderHWCursorBuffer(void* thisptr, SP<CPointerManager::SMonitorPointerState> state, SP<CTexture> texture) { SP<Aquamarine::IBuffer> hkRenderHWCursorBuffer(void* thisptr, SP<CPointerManager::SMonitorPointerState> state, SP<CTexture> texture) {
if (isEnabled()) return g_pDynamicCursors->renderHardware((CPointerManager*) thisptr, state, texture); if (isEnabled()) return g_pDynamicCursors->renderHardware((CPointerManager*) thisptr, state, texture);
else return (*(origRenderHWCursorBuffer)g_pRenderHWCursorBufferHook->m_pOriginal)(thisptr, state, texture); else return (*(origRenderHWCursorBuffer)g_pRenderHWCursorBufferHook->m_original)(thisptr, state, texture);
} }
typedef bool (*origSetHWCursorBuffer)(void*, SP<CPointerManager::SMonitorPointerState>, SP<Aquamarine::IBuffer>); typedef bool (*origSetHWCursorBuffer)(void*, SP<CPointerManager::SMonitorPointerState>, SP<Aquamarine::IBuffer>);
inline CFunctionHook* g_pSetHWCursorBufferHook = nullptr; inline CFunctionHook* g_pSetHWCursorBufferHook = nullptr;
bool hkSetHWCursorBuffer(void* thisptr, SP<CPointerManager::SMonitorPointerState> state, SP<Aquamarine::IBuffer> buffer) { bool hkSetHWCursorBuffer(void* thisptr, SP<CPointerManager::SMonitorPointerState> state, SP<Aquamarine::IBuffer> buffer) {
if (isEnabled()) return g_pDynamicCursors->setHardware((CPointerManager*) thisptr, state, buffer); if (isEnabled()) return g_pDynamicCursors->setHardware((CPointerManager*) thisptr, state, buffer);
else return (*(origSetHWCursorBuffer)g_pSetHWCursorBufferHook->m_pOriginal)(thisptr, state, buffer); else return (*(origSetHWCursorBuffer)g_pSetHWCursorBufferHook->m_original)(thisptr, state, buffer);
} }
typedef void (*origOnCursorMoved)(void*); typedef void (*origOnCursorMoved)(void*);
inline CFunctionHook* g_pOnCursorMovedHook = nullptr; inline CFunctionHook* g_pOnCursorMovedHook = nullptr;
void hkOnCursorMoved(void* thisptr) { void hkOnCursorMoved(void* thisptr) {
if (isEnabled()) return g_pDynamicCursors->onCursorMoved((CPointerManager*) thisptr); if (isEnabled()) return g_pDynamicCursors->onCursorMoved((CPointerManager*) thisptr);
else return (*(origOnCursorMoved)g_pOnCursorMovedHook->m_pOriginal)(thisptr); else return (*(origOnCursorMoved)g_pOnCursorMovedHook->m_original)(thisptr);
} }
typedef void (*origSetCusorFromName)(void*, const std::string& name); typedef void (*origSetCusorFromName)(void*, const std::string& name);
inline CFunctionHook* g_pSetCursorFromNameHook = nullptr; inline CFunctionHook* g_pSetCursorFromNameHook = nullptr;
void hkSetCursorFromName(void* thisptr, const std::string& name) { void hkSetCursorFromName(void* thisptr, const std::string& name) {
if (isEnabled()) g_pDynamicCursors->setShape(name); if (isEnabled()) g_pDynamicCursors->setShape(name);
(*(origSetCusorFromName)g_pSetCursorFromNameHook->m_pOriginal)(thisptr, name); (*(origSetCusorFromName)g_pSetCursorFromNameHook->m_original)(thisptr, name);
} }
typedef void (*origSetCursorSurface)(void*, SP<CWLSurface>, const Vector2D&); typedef void (*origSetCursorSurface)(void*, SP<CWLSurface>, const Vector2D&);
inline CFunctionHook* g_pSetCursorSurfaceHook = nullptr; inline CFunctionHook* g_pSetCursorSurfaceHook = nullptr;
void hkSetCursorSurface(void* thisptr, SP<CWLSurface> surf, const Vector2D& hotspot) { void hkSetCursorSurface(void* thisptr, SP<CWLSurface> surf, const Vector2D& hotspot) {
if (isEnabled()) g_pDynamicCursors->unsetShape(); if (isEnabled()) g_pDynamicCursors->unsetShape();
(*(origSetCursorSurface)g_pSetCursorSurfaceHook->m_pOriginal)(thisptr, surf, hotspot); (*(origSetCursorSurface)g_pSetCursorSurfaceHook->m_original)(thisptr, surf, hotspot);
} }
typedef void (*origMove)(void*, const Vector2D&); typedef void (*origMove)(void*, const Vector2D&);
inline CFunctionHook* g_pMoveHook = nullptr; inline CFunctionHook* g_pMoveHook = nullptr;
void hkMove(void* thisptr, const Vector2D& deltaLogical) { void hkMove(void* thisptr, const Vector2D& deltaLogical) {
if (isEnabled()) g_pDynamicCursors->setMove(); if (isEnabled()) g_pDynamicCursors->setMove();
(*(origMove)g_pMoveHook->m_pOriginal)(thisptr, deltaLogical); (*(origMove)g_pMoveHook->m_original)(thisptr, deltaLogical);
} }
typedef void (*origUpdateTheme)(void*); typedef void (*origUpdateTheme)(void*);
inline CFunctionHook* g_pUpdateThemeHook = nullptr; inline CFunctionHook* g_pUpdateThemeHook = nullptr;
void hkUpdateTheme(void* thisptr) { void hkUpdateTheme(void* thisptr) {
(*(origUpdateTheme) g_pUpdateThemeHook->m_pOriginal)(thisptr); (*(origUpdateTheme) g_pUpdateThemeHook->m_original)(thisptr);
if (isEnabled()) g_pDynamicCursors->updateTheme(); if (isEnabled()) g_pDynamicCursors->updateTheme();
} }