mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 08:49:49 +01:00
swipe: fix mixup of r/m
This commit is contained in:
parent
18f9fb5e0f
commit
07d7962c7f
1 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ void CInputManager::onSwipeEnd(wlr_pointer_swipe_end_event* e) {
|
||||||
// commit
|
// commit
|
||||||
std::string wsname = "";
|
std::string wsname = "";
|
||||||
auto workspaceIDLeft = getWorkspaceIDFromString(*PSWIPENUMBER ? "-1" : (*PSWIPEUSER ? "r-1" : "m-1"), wsname);
|
auto workspaceIDLeft = getWorkspaceIDFromString(*PSWIPENUMBER ? "-1" : (*PSWIPEUSER ? "r-1" : "m-1"), wsname);
|
||||||
auto workspaceIDRight = getWorkspaceIDFromString(*PSWIPENUMBER ? "+1" : (*PSWIPEUSER ? "m+1" : "r+1"), wsname);
|
auto workspaceIDRight = getWorkspaceIDFromString(*PSWIPENUMBER ? "+1" : (*PSWIPEUSER ? "r+1" : "m+1"), wsname);
|
||||||
|
|
||||||
// If we've been swiping off the right end with PSWIPENEW enabled, there is
|
// If we've been swiping off the right end with PSWIPENEW enabled, there is
|
||||||
// no workspace there yet, and we need to choose an ID for a new one now.
|
// no workspace there yet, and we need to choose an ID for a new one now.
|
||||||
|
@ -203,7 +203,7 @@ void CInputManager::onSwipeUpdate(wlr_pointer_swipe_update_event* e) {
|
||||||
|
|
||||||
std::string wsname = "";
|
std::string wsname = "";
|
||||||
auto workspaceIDLeft = getWorkspaceIDFromString(*PSWIPENUMBER ? "-1" : (*PSWIPEUSER ? "r-1" : "m-1"), wsname);
|
auto workspaceIDLeft = getWorkspaceIDFromString(*PSWIPENUMBER ? "-1" : (*PSWIPEUSER ? "r-1" : "m-1"), wsname);
|
||||||
auto workspaceIDRight = getWorkspaceIDFromString(*PSWIPENUMBER ? "+1" : (*PSWIPEUSER ? "m+1" : "r+1"), wsname);
|
auto workspaceIDRight = getWorkspaceIDFromString(*PSWIPENUMBER ? "+1" : (*PSWIPEUSER ? "r+1" : "m+1"), wsname);
|
||||||
|
|
||||||
if ((workspaceIDLeft == INT_MAX || workspaceIDRight == INT_MAX || workspaceIDLeft == m_sActiveSwipe.pWorkspaceBegin->m_iID) && !*PSWIPENEW) {
|
if ((workspaceIDLeft == INT_MAX || workspaceIDRight == INT_MAX || workspaceIDLeft == m_sActiveSwipe.pWorkspaceBegin->m_iID) && !*PSWIPENEW) {
|
||||||
m_sActiveSwipe.pWorkspaceBegin = nullptr; // invalidate the swipe
|
m_sActiveSwipe.pWorkspaceBegin = nullptr; // invalidate the swipe
|
||||||
|
|
Loading…
Reference in a new issue