Skip to content

Commit

Permalink
Fix Alt+Tab prioritization for issue #673.
Browse files Browse the repository at this point in the history
  • Loading branch information
gijsbers committed Nov 1, 2022
1 parent 6502c0a commit ff0a37b
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions src/wmswitch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -322,28 +322,28 @@ void WindowItemsCtrlr::updateList() {
}

int prio = 0;
if (!frame->hasState(WinStateUrgent) && !client->urgencyHint()) {
prio = 1 + !quickSwitchToUrgent;
}
else if (frame == focused) {
if (frame == focused) {
if (client == fclient)
prio = 2;
prio = 1;
else
prio = 3;
prio = 2;
}
else if (frame->avoidFocus()) {
prio = 5;
else if (quickSwitchToUrgent && frame->isUrgent()) {
prio = 3;
}
else if (frame->isMinimized()) {
if (quickSwitchToMinimized)
prio = 6;
}
else if (frame->isHidden()) {
if (quickSwitchToHidden)
prio = 4;
prio = 7;
}
else if (frame->isMinimized()) {
if (quickSwitchToMinimized)
prio = 3;
else if (frame->avoidFocus()) {
prio = 8;
}
else {
prio = 2;
prio = 4;
}
if (prio) {
zList += ZItem(prio, index, frame, client);
Expand All @@ -365,8 +365,6 @@ void WindowItemsCtrlr::sort() {
}
else if (act) {
fActiveItem = zList[act];
zList.remove(act);
zList.insert(0, fActiveItem);
zTarget = act;
}
}
Expand Down

0 comments on commit ff0a37b

Please sign in to comment.