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
1 changed files with 5 additions and 1 deletions

View File

@ -2366,8 +2366,12 @@ void CCompositor::warpCursorTo(const Vector2D& pos, bool force) {
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;
}
g_pPointerManager->warpTo(pos);