monitor: report a scheduled frame when tearing on cursor move

This commit is contained in:
Vaxry 2025-02-15 00:18:43 +00:00
parent fb36815b01
commit 1309b59f2c
3 changed files with 28 additions and 1 deletions

View file

@ -17,6 +17,9 @@
#include <cstring>
#include <gbm.h>
#include <cairo/cairo.h>
#include <hyprutils/utils/ScopeGuard.hpp>
using namespace Hyprutils::Utils;
CPointerManager::CPointerManager() {
hooks.monitorAdded = g_pHookSystem->hookDynamic("monitorAdded", [this](void* self, SCallbackInfo& info, std::any data) {
@ -310,7 +313,12 @@ void CPointerManager::onCursorMoved() {
recalc = true;
}
if (state->hardwareFailed || !state->entered)
if (!state->entered)
continue;
CScopeGuard x([m] { m->onCursorMovedOnMonitor(); });
if (state->hardwareFailed)
continue;
const auto CURSORPOS = getCursorPosForMonitor(m);