Fixed mouse constraints, should be correct now
This commit is contained in:
parent
8cf1e6d60d
commit
5454cf8e89
3 changed files with 54 additions and 28 deletions
|
|
@ -175,6 +175,9 @@ void CKeybindManager::changeworkspace(std::string args) {
|
|||
return;
|
||||
}
|
||||
|
||||
// remove constraints
|
||||
g_pCompositor->m_sSeat.mouse->constraintActive = false;
|
||||
|
||||
// if it exists, we warp to it
|
||||
if (g_pCompositor->getWorkspaceByID(workspaceToChangeTo)) {
|
||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(g_pCompositor->getWorkspaceByID(workspaceToChangeTo)->m_iMonitorID);
|
||||
|
|
@ -400,6 +403,9 @@ void CKeybindManager::moveFocusTo(std::string args) {
|
|||
|
||||
const auto PLASTWINDOW = g_pCompositor->m_pLastWindow;
|
||||
|
||||
// remove constraints
|
||||
g_pCompositor->m_sSeat.mouse->constraintActive = false;
|
||||
|
||||
auto switchToWindow = [&](CWindow* PWINDOWTOCHANGETO) {
|
||||
g_pCompositor->focusWindow(PWINDOWTOCHANGETO);
|
||||
Vector2D middle = PWINDOWTOCHANGETO->m_vRealPosition.goalv() + PWINDOWTOCHANGETO->m_vRealSize.goalv() / 2.f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue