Skip to content

Commit

Permalink
input-capture: fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
3l0w committed Oct 22, 2024
1 parent 255db25 commit 189f615
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
9 changes: 1 addition & 8 deletions src/managers/PointerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,14 +852,7 @@ void CPointerManager::attachPointer(SP<IPointer> 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) {
Expand Down
9 changes: 8 additions & 1 deletion src/managers/input/InputManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 0 additions & 3 deletions src/protocols/core/Output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 189f615

Please sign in to comment.