kovidgoyal/kitty

Z-index/window stack order isssue on gnome + Arch

drschwabe opened this issue · 3 comments

Kitty often loses its ability to be 'clicked' when its in the background where foreground windows are in front of it. There's weird behavior where the other windows in foreground will toggle focus even when clicking the kitty background.

The expected behavior is obviously when you click Kitty even if windows are in the foreground Kitty will appear above the stacking order.

The workaround when this happens is to Alt-Tab directly to Kitty and then it has focus as expected.
Or to close the Kitty window entirely and start a new one (until the issue occurs again)

To Reproduce
Steps to reproduce the behavior:

  1. use kitty for a while with a bunch of other windows like browser, a text edtitor, etc
  2. eventually the aforementioned window bug starts happening

It doesn't always happen and seems to be more prone to happening when i have a long running process that is spitting out lots of lines at once to stdout.

It could also be a gnome bug but I only have this issue with Kitty so I decided to post the issue here first in my attempt to solve the issue.

There is no such thing as "ability to be clicked". kitty does not focus
itself when it is clicked, that is done by the window manager, so if
kitty is not getting focused on click the issue is in the window
manager.

Since you are running under X11, what happens is the x server sends a
client a "FocusIn" event to indicate to it it now has keyboard focus.

Note that you can see all keyboard and mouse events kitty receives from
the system by running it with --debug-input.

Ok thanks perhaps i'll look into the bug via gnome then and/or try a different desktop manager to split test the issue.

The odd thing is that when this bug happens you can get kitty's focus back (ie- by alt tab) but it still cannot be clicked - it can only receive keyboard input - if you try clicking kitty the foreground windows unexpectedly appear where you click.