fixup: fix breakage after cursor rewrite

This commit is contained in:
outfoxxed 2024-05-19 01:48:12 -07:00
parent 33c8d761ff
commit 400930e039
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
4 changed files with 35 additions and 51 deletions

77
flake.lock generated
View file

@ -32,46 +32,47 @@
"hyprland": {
"inputs": {
"hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs",
"systems": "systems",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1714837352,
"narHash": "sha256-QzzJTb+0CBqgAT0wKZsOt1rky5+u2zMUlNxbZcGj2VM=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "cba1ade848feac44b2eda677503900639581c3f4",
"type": "github"
"lastModified": 1715817355,
"narHash": "sha256-/XuIc6AkzUZVJkKNYBCSGK+G5sLgfLY9zd+gIXLNcGA=",
"ref": "refs/heads/main",
"rev": "de9798fcf9494eb082bd168175390c0d47b8478b",
"revCount": 4702,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/hyprland"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "cba1ade848feac44b2eda677503900639581c3f4",
"type": "github"
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/hyprland"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"xdph",
"nixpkgs"
],
"systems": [
"hyprland",
"xdph",
"systems"
]
},
"locked": {
"lastModified": 1714869498,
"narHash": "sha256-vbLVOWvQqo4n1yvkg/Q70VTlPbMmTiCQfNTgcWDCfJM=",
"lastModified": 1691753796,
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "e06482e0e611130cd1929f75e8c1cf679e57d161",
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
"type": "github"
},
"original": {
@ -92,11 +93,11 @@
]
},
"locked": {
"lastModified": 1713121246,
"narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=",
"lastModified": 1715610285,
"narHash": "sha256-i8ZQeEiwXYhmzqyUaFeHhnRVu6L7g5cy33PcTQjPw4U=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706",
"rev": "19ec261528f924a275860dcab7979519e41809e5",
"type": "github"
},
"original": {
@ -117,11 +118,11 @@
]
},
"locked": {
"lastModified": 1714755542,
"narHash": "sha256-D0pg+ZRwrt4lavZ97Ca8clsgbPA3duLj8iEM7riaIFY=",
"lastModified": 1715608589,
"narHash": "sha256-vimNaLjLcoNIvBhF37GaB6PRYEvKMamY3UnDE9M5MW8=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "1270ebaa539e56d61b708c24b072b09cbbd3a828",
"rev": "65c2636484e5cb00583b8a7446c3fb657f568883",
"type": "github"
},
"original": {
@ -132,11 +133,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1714253743,
"narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=",
"lastModified": 1715447595,
"narHash": "sha256-VsVAUQOj/cS1LCOmMjAGeRksXIAdPnFIjCQ0XLkCsT0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994",
"rev": "062ca2a9370a27a35c524dc82d540e6e9824b652",
"type": "github"
},
"original": {
@ -166,29 +167,9 @@
"type": "github"
}
},
"wlroots": {
"flake": false,
"locked": {
"lastModified": 1713731601,
"narHash": "sha256-bdcKdtLkusvv85DNuJsajZLFeq7bXp+x5AGP1Sd4wD8=",
"owner": "hyprwm",
"repo": "wlroots-hyprland",
"rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "wlroots-hyprland",
"rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea",
"type": "github"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprland-protocols": "hyprland-protocols",
"hyprlang": [
"hyprland",
"hyprlang"
@ -203,11 +184,11 @@
]
},
"locked": {
"lastModified": 1714060055,
"narHash": "sha256-j43TS9wv9luaAlpxcxw0sjxkbcc2mGANVR2RYgo3RCw=",
"lastModified": 1714662532,
"narHash": "sha256-Pj2xGSYhapYbXL7sk7TTlOtCZcTfPQoL3fPbZeg7L4Y=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "0fe840441e43da12cd7865ed9aa8cdc35a8da85a",
"rev": "1f228ba2f1f254195c0b571302b37482861abee3",
"type": "github"
},
"original": {

View file

@ -30,7 +30,9 @@
impure = import ./shell.nix {
pkgs = import <nixpkgs> {};
hlversion = props.version;
hyprland = (pkgs.appendOverlays [ hyprland.overlays.hyprland-packages ]).hyprland-debug;
hyprland = (pkgs.appendOverlays [ hyprland.overlays.hyprland-packages ]).hyprland-debug.overrideAttrs {
dontStrip = true;
};
};
});
};

View file

@ -5,6 +5,7 @@
#include <hyprland/src/desktop/DesktopTypes.hpp>
#include <hyprland/src/desktop/Workspace.hpp>
#include <hyprland/src/plugins/PluginAPI.hpp>
#include <hyprland/src/managers/PointerManager.hpp>
#include <ranges>
#include "Hy3Layout.hpp"
@ -1358,7 +1359,7 @@ fsupdate:
}
void Hy3Layout::warpCursorToBox(const Vector2D& pos, const Vector2D& size) {
auto cursorpos = Vector2D(g_pCompositor->m_sWLRCursor->x, g_pCompositor->m_sWLRCursor->y);
auto cursorpos = g_pPointerManager->position();
if (cursorpos.x < pos.x || cursorpos.x >= pos.x + size.x || cursorpos.y < pos.y
|| cursorpos.y >= pos.y + size.y)

View file

@ -113,7 +113,7 @@ void dispatch_movefocus(std::string value) {
auto args = CVarList(value);
static const auto no_cursor_warps = ConfigValue<Hyprlang::INT>("general:no_cursor_warps");
static const auto no_cursor_warps = ConfigValue<Hyprlang::INT>("cursor:no_warps");
auto warp_cursor = !*no_cursor_warps;
int argi = 0;