Skip to content

Commit

Permalink
Raise newly focused window when current one closes
Browse files Browse the repository at this point in the history
The current behavior is confusing. All windows are maximized. Open
Emacs, Alt-tab over all windows back to Emacs. Close Emacs. The chosen
window to have focus (because Emacs window is gone) is _not_ the one on
top [1].

So you don't really see what window is being focused (remember all
windows are maximized). Whatever you type is going to a window you
cannot see.

The behavior is different if you don't just cycle through all windows.

[1] because it's chosen from MRU list, but I'm not exactly sure how MRU
    list is updated, when alt-tabbing. So perhaps the problem is with
    updating MRU correctly.
  • Loading branch information
pclouds committed Mar 20, 2024
1 parent 8f3e4fe commit a6fd205
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Workspaces.cc
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ Workspaces::findWOAndFocus(PWinObj *search)

if (focus) {
focus->giveInputFocus();
focus->raise();
} else if (! PWinObj::getFocusedPWinObj()) {
pekwm::rootWo()->giveInputFocus();
pekwm::rootWo()->setEwmhActiveWindow(None);
Expand Down

0 comments on commit a6fd205

Please sign in to comment.