mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-25 07:46:00 +01:00
input-capture: fix rebase issues
This commit is contained in:
parent
255db25664
commit
189f6152f1
3 changed files with 9 additions and 12 deletions
|
@ -852,14 +852,7 @@ void CPointerManager::attachPointer(SP<IPointer> pointer) {
|
||||||
});
|
});
|
||||||
|
|
||||||
listener->frame = pointer->pointerEvents.frame.registerListener([this] (std::any e) {
|
listener->frame = pointer->pointerEvents.frame.registerListener([this] (std::any e) {
|
||||||
bool shouldSkip = false;
|
g_pInputManager->onMouseFrame();
|
||||||
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();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
listener->swipeBegin = pointer->pointerEvents.swipeBegin.registerListener([this] (std::any e) {
|
listener->swipeBegin = pointer->pointerEvents.swipeBegin.registerListener([this] (std::any e) {
|
||||||
|
|
|
@ -854,7 +854,14 @@ void CInputManager::onMouseFrame() {
|
||||||
if (PROTO::inputCapture->isCaptured())
|
if (PROTO::inputCapture->isCaptured())
|
||||||
return;
|
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() {
|
Vector2D CInputManager::getMouseCoordsInternal() {
|
||||||
|
|
|
@ -78,9 +78,6 @@ void CWLOutputResource::updateState() {
|
||||||
monitor->output->model.c_str(), monitor->transform);
|
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->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)
|
if (resource->version() >= 2)
|
||||||
resource->sendDone();
|
resource->sendDone();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue