compositor: change monitor focus when no_warps is enabled (#6260)

fixes focus between monitors when moving using directions with no_warps = true
This commit is contained in:
AERDU 2024-05-27 20:45:14 +00:00 committed by GitHub
parent 546a486bab
commit 506d0c06e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2366,8 +2366,12 @@ void CCompositor::warpCursorTo(const Vector2D& pos, bool force) {
static auto PNOWARPS = CConfigValue<Hyprlang::INT>("cursor:no_warps"); static auto PNOWARPS = CConfigValue<Hyprlang::INT>("cursor:no_warps");
if (*PNOWARPS && !force) if (*PNOWARPS && !force) {
const auto PMONITORNEW = getMonitorFromVector(pos);
if (PMONITORNEW != m_pLastMonitor.get())
setActiveMonitor(PMONITORNEW);
return; return;
}
g_pPointerManager->warpTo(pos); g_pPointerManager->warpTo(pos);