mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-07 19:18:05 +02:00
keybinds: fixup changegroupactive
This commit is contained in:
parent
c4dfa1b076
commit
31a33113b7
1 changed files with 4 additions and 1 deletions
|
|
@ -1690,7 +1690,10 @@ SDispatchResult CKeybindManager::changeGroupActive(std::string args) {
|
|||
// index starts from '1'; '0' means last window
|
||||
try {
|
||||
const int INDEX = std::stoi(args);
|
||||
PWINDOW->m_group->setCurrent(INDEX);
|
||||
if (INDEX <= 0)
|
||||
PWINDOW->m_group->setCurrent(PWINDOW->m_group->size() - 1);
|
||||
else
|
||||
PWINDOW->m_group->setCurrent(INDEX - 1);
|
||||
} catch (...) { return {.success = false, .error = "invalid idx"}; }
|
||||
|
||||
return {};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue