From 189f6152f1354ae936cafffa7b7dd62af8dd5bd4 Mon Sep 17 00:00:00 2001 From: Gwilherm Folliot Date: Tue, 22 Oct 2024 11:54:16 +0200 Subject: [PATCH] input-capture: fix rebase issues --- src/managers/PointerManager.cpp | 9 +-------- src/managers/input/InputManager.cpp | 9 ++++++++- src/protocols/core/Output.cpp | 3 --- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp index 4ecc362b..3749a73f 100644 --- a/src/managers/PointerManager.cpp +++ b/src/managers/PointerManager.cpp @@ -852,14 +852,7 @@ void CPointerManager::attachPointer(SP pointer) { }); listener->frame = pointer->pointerEvents.frame.registerListener([this] (std::any e) { - bool shouldSkip = false; - if (!g_pSeatManager->mouse.expired() && g_pInputManager->isLocked()) { - auto PMONITOR = g_pCompositor->m_pLastMonitor.get(); - shouldSkip = PMONITOR && PMONITOR->shouldSkipScheduleFrameOnMouseEvent(); - } - g_pSeatManager->isPointerFrameSkipped = shouldSkip; - if (!g_pSeatManager->isPointerFrameSkipped) - g_pSeatManager->sendPointerFrame(); + g_pInputManager->onMouseFrame(); }); listener->swipeBegin = pointer->pointerEvents.swipeBegin.registerListener([this] (std::any e) { diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 579cf1fd..1d235c00 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -854,7 +854,14 @@ void CInputManager::onMouseFrame() { if (PROTO::inputCapture->isCaptured()) return; - g_pSeatManager->sendPointerFrame(); + bool shouldSkip = false; + if (!g_pSeatManager->mouse.expired() && g_pInputManager->isLocked()) { + auto PMONITOR = g_pCompositor->m_pLastMonitor.get(); + shouldSkip = PMONITOR && PMONITOR->shouldSkipScheduleFrameOnMouseEvent(); + } + g_pSeatManager->isPointerFrameSkipped = shouldSkip; + if (!g_pSeatManager->isPointerFrameSkipped) + g_pSeatManager->sendPointerFrame(); } Vector2D CInputManager::getMouseCoordsInternal() { diff --git a/src/protocols/core/Output.cpp b/src/protocols/core/Output.cpp index dbeb67fa..e9470936 100644 --- a/src/protocols/core/Output.cpp +++ b/src/protocols/core/Output.cpp @@ -78,9 +78,6 @@ void CWLOutputResource::updateState() { monitor->output->model.c_str(), monitor->transform); resource->sendMode((wl_output_mode)(WL_OUTPUT_MODE_CURRENT), monitor->vecPixelSize.x, monitor->vecPixelSize.y, monitor->refreshRate * 1000.0); - resource->sendGeometry(0, 0, monitor->output->physicalSize.x, monitor->output->physicalSize.y, (wl_output_subpixel)monitor->output->subpixel, monitor->output->make.c_str(), - monitor->output->model.c_str(), monitor->transform); - if (resource->version() >= 2) resource->sendDone(); }