Auto-select of different window focus after closing another window

On UbuntuMATE 22.04, I suggest you perform the following steps:

  • Open Caja (focus assigned to that window)
  • double-click on text file (focus shifts to gvim in new window)
  • close text window (focus shifts back to Caja)
  • double-click on PNG file (focus shifts to EOM in new window)
  • close EOM (focus is not shifted back to Caja !!!)

My expectation is that focus should be shifting back to Caja. Given my preferences, I don't have auto-focus based on mouse hover; I must click in the window to obtain focus.

Why did Caja not get auto-focused when EOM closed?

Since Caja was the only other window open in that Workspace, I expected that to be "focused".

Also, not knowing how MATE or other Linux desktop internals operate, my intuition would expect that the desktop is keeping track of the "recency of visit" to various windows and whenever a window closes, it would auto-reassign the focus to the next most-recent window "visited". Again, using my intuition as guide, I would expect the "layering" of windows to reflect that recency, namely top layer most recent, lower layers less recent, bottom layer oldest.

So ... regarding my issue with the lack of auto-focus,

  • is this a newly identified bug, or
  • is this a bug at 22.04 that is fixed in 24.04, or
  • is there yet another "tweak" that will deal with this perceived mis-behaviour (and if this, please share the necessary tweak)?
1 Like

Hi Eric,

Nice find !! :+1:

I tried opening JPG and PNG with EOM from within CAJA and indeed it doesn't focus back.

But here is the strange thing:

  1. Doing the same but with WEBP, instead of JPG, does focus back to CAJA
  2. If EOM errors out on opening an incompatible picture, it also does focus back to CAJA

I have no idea why but this is quite unexpected. :slight_smile:

1 Like