mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-02 00:45:58 +01:00
pointer: change min cursor padding to 0 (#6027)
* fix: change min cursor padding to 0 * chore: set default hotspot padding to 0 * fix: adjusting clamp after getting closest point to fix getting off limit point * fix: deal with floating point to clamp to prev value * refactor: max coords to vector * fix: remove box closestPoint adjustment due its fix on hyprutils
This commit is contained in:
parent
e58fd3bfb0
commit
2fa57f2dc4
2 changed files with 2 additions and 2 deletions
|
@ -525,7 +525,7 @@ CConfigManager::CConfigManager() {
|
||||||
m_pConfig->addConfigValue("cursor:no_hardware_cursors", Hyprlang::INT{0});
|
m_pConfig->addConfigValue("cursor:no_hardware_cursors", Hyprlang::INT{0});
|
||||||
m_pConfig->addConfigValue("cursor:no_break_fs_vrr", Hyprlang::INT{0});
|
m_pConfig->addConfigValue("cursor:no_break_fs_vrr", Hyprlang::INT{0});
|
||||||
m_pConfig->addConfigValue("cursor:min_refresh_rate", Hyprlang::INT{24});
|
m_pConfig->addConfigValue("cursor:min_refresh_rate", Hyprlang::INT{24});
|
||||||
m_pConfig->addConfigValue("cursor:hotspot_padding", Hyprlang::INT{1});
|
m_pConfig->addConfigValue("cursor:hotspot_padding", Hyprlang::INT{0});
|
||||||
m_pConfig->addConfigValue("cursor:inactive_timeout", Hyprlang::INT{0});
|
m_pConfig->addConfigValue("cursor:inactive_timeout", Hyprlang::INT{0});
|
||||||
m_pConfig->addConfigValue("cursor:no_warps", Hyprlang::INT{0});
|
m_pConfig->addConfigValue("cursor:no_warps", Hyprlang::INT{0});
|
||||||
m_pConfig->addConfigValue("cursor:persistent_warps", Hyprlang::INT{0});
|
m_pConfig->addConfigValue("cursor:persistent_warps", Hyprlang::INT{0});
|
||||||
|
|
|
@ -612,7 +612,7 @@ CBox CPointerManager::getCursorBoxGlobal() {
|
||||||
Vector2D CPointerManager::closestValid(const Vector2D& pos) {
|
Vector2D CPointerManager::closestValid(const Vector2D& pos) {
|
||||||
static auto PADDING = CConfigValue<Hyprlang::INT>("cursor:hotspot_padding");
|
static auto PADDING = CConfigValue<Hyprlang::INT>("cursor:hotspot_padding");
|
||||||
|
|
||||||
auto CURSOR_PADDING = std::clamp((int)*PADDING, 1, 100); // 1px
|
auto CURSOR_PADDING = std::clamp((int)*PADDING, 0, 100);
|
||||||
CBox hotBox = {{pos.x - CURSOR_PADDING, pos.y - CURSOR_PADDING}, {2 * CURSOR_PADDING, 2 * CURSOR_PADDING}};
|
CBox hotBox = {{pos.x - CURSOR_PADDING, pos.y - CURSOR_PADDING}, {2 * CURSOR_PADDING, 2 * CURSOR_PADDING}};
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue