by nh2 · 1y ago · 0 comments
So many times on X11 do I type some chat message, and then some popup from another program comes up, which I accidentally confirm by my typing containing a space which presses the confirmation button, and I don't even know what the popup was.
Or my password being typed in a popup.
I once patched some code into i3 to prevent this for myself, but it wasn't a clean solution.
Even on "Low" (the options are None, Low, Medium, High, Extreme) I'm not seeing this behavior. Might be an i3 problem.
You said "mechanism seems worth it". While there seems to be some work on extending it, this is not a new mechanism. A hypothetical i3 port to Wayland might very well have the same behaviour you dislike. (I wouldn't categorise sway as a port, rewrite seems more like it.)
sleep 2 && zenity --entry --text="Enter text:"
and switch to a different workspace where you start typing.The popup of the other program should appear and capture your input.
As far as I know, i3 has no prevention for that.
(In this example I'm spawning a program delayed to demonstrate that, but the same can happen to e.g. the gpg-agent password prompt popping up when an SSH connection that uses it reconnects, a chat window from an IM program, and so on. I think the idea of Wayland window activation / focus stealing prevention is that you can still have those windows pop up, but without them taking your input.)