summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-04-16 14:48:38 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-04-16 14:48:38 +0100
commitb05ff89c76b2c9454c76daf2120f4ccb076a018d (patch)
tree14067692ffc6a25ac24f43680bbb880d96c0d76c /src/managers/input/InputManager.cpp
parent28dfe215844fe33d425bda33c677a0fae835082b (diff)
Render: add cursor_zoom
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 118f21c7..9eebc93a 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -56,6 +56,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
static auto* const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue;
static auto* const PBORDERGRABEXTEND = &g_pConfigManager->getConfigValuePtr("general:extend_border_grab_area")->intValue;
static auto* const PRESIZECURSORICON = &g_pConfigManager->getConfigValuePtr("general:hover_icon_on_border")->intValue;
+ static auto* const PZOOMFACTOR = &g_pConfigManager->getConfigValuePtr("misc:cursor_zoom_factor")->floatValue;
const auto BORDER_GRAB_AREA = *PRESIZEONBORDER ? *PBORDERSIZE + *PBORDERGRABEXTEND : 0;
const auto FOLLOWMOUSE = *PFOLLOWONDND && m_sDrag.drag ? 1 : *PFOLLOWMOUSE;
@@ -89,6 +90,9 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
const auto PMONITOR = g_pCompositor->getMonitorFromCursor();
+ if (*PZOOMFACTOR != 1.f)
+ g_pHyprRenderer->damageMonitor(PMONITOR);
+
// constraints
// All constraints TODO: multiple mice?
if (g_pCompositor->m_sSeat.mouse && g_pCompositor->m_sSeat.mouse->currentConstraint && !g_pCompositor->m_sSeat.exclusiveClient && !g_pSessionLockManager->isSessionLocked()) {