virtualptr: allow binding to output

This commit is contained in:
Vaxry
2024-07-29 16:27:09 +02:00
parent 70468857da
commit 23a8f06594
5 changed files with 36 additions and 12 deletions

View File

@@ -674,6 +674,16 @@ void CPointerManager::warpAbsolute(Vector2D abs, SP<IHID> dev) {
}
break;
}
case HID_TYPE_POINTER: {
IPointer* POINTER = reinterpret_cast<IPointer*>(dev.get());
if (!POINTER->boundOutput.empty() && POINTER->boundOutput != "auto") {
if (const auto PMONITOR = g_pCompositor->getMonitorFromString(POINTER->boundOutput); PMONITOR) {
currentMonitor = PMONITOR->self.lock();
mappedArea = currentMonitor->logicalBox();
}
}
break;
}
default: break;
}