diff options
author | Vaxry <[email protected]> | 2024-09-16 08:56:37 +0100 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-09-16 08:56:37 +0100 |
commit | a4298ca7872f949d09cb5fa1cbcb449b7964c664 (patch) | |
tree | 983284ef47ffb6c17401b4c8035120a0b88587e1 | |
parent | a9ba442628049e8d9ace28926683076896bef920 (diff) | |
download | Hyprland-a4298ca7872f949d09cb5fa1cbcb449b7964c664.tar.gz Hyprland-a4298ca7872f949d09cb5fa1cbcb449b7964c664.zip |
e
-rw-r--r-- | src/managers/PointerManager.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp index 1115efa8..96d54ff5 100644 --- a/src/managers/PointerManager.cpp +++ b/src/managers/PointerManager.cpp @@ -307,6 +307,8 @@ void CPointerManager::resetCursorImage(bool apply) { void CPointerManager::updateCursorBackend() { static auto PNOHW = CConfigValue<Hyprlang::INT>("cursor:no_hardware_cursors"); + const auto CURSORBOX = getCursorBoxGlobal(); + for (auto const& m : g_pCompositor->m_vMonitors) { auto state = stateFor(m); @@ -315,6 +317,15 @@ void CPointerManager::updateCursorBackend() { continue; } + auto CROSSES = !m->logicalBox().intersection(CURSORBOX).empty(); + + if (!CROSSES) { + if (state->cursorFrontBuffer) + setHWCursorBuffer(state, nullptr); + + continue; + } + if (state->softwareLocks > 0 || *PNOHW || !attemptHardwareCursor(state)) { Debug::log(TRACE, "Output {} rejected hardware cursors, falling back to sw", m->szName); state->box = getCursorBoxLogicalForMonitor(state->monitor.lock()); |