-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various focus issues #358
Comments
These are actually two different and unrelated issues. Could you give reproducable scenarios for the first? Does it also work in other focus modes, like Quiet Sloppy Focus? |
I can now confirm that the first problem affects 1.5.5+git20190610-1 too. I don't know a way to reproduce any of these issues. They seem to happen randomly. Sometimes they're fairly consistent. Right now, opening a new firefox window (via shortcut) often shows it defocused like in the first issue (but without keyboard focus; a third case I guess), unless I hit the shortcut while a newly created urxvt window is focused. Makes no sense to me. |
The second is fixed. For the first there isn't enough information to work on it yet. |
Is there anything I could do to debug this? |
Yes, the best would be reproducibility. At least a sequence of actions leading up to the condition. |
I really can't come up with something reproducible. I guess it just depends on the current window order, but I have no idea what could trigger it. How can I monitor said properties? |
Here is one cheap trick, which you could add to the icewm keys file, but you want this information on both the focused window and the other window.
It may be a https://en.wikipedia.org/wiki/Race_condition, which is notoriously difficult to debug. |
Starting firefox with a key binding, while hexchat was focused. Hexchat stayed focused and ekyboard input went to it in this case.
Nothing interesting here, I guess? _NET_WM_STATE_DEMANDS_ATTENTION is true, in some (all?) cases, the new window will flash around. I could have mentioned this before. Omitted timestamps that your script snippet adds, since they were meaningless. I got the active window by using "sleep 10s" + part of your snippet, and the firefox window by switching to a terminal and manually calling xprop (without focusing the firefox window). |
Good. The DEMANDS_ATTENTION is quite relevant, as is Firefox, because it relates to bug #196. I can repeat this scenario: set focus to ClickFocus. Open hexchat on an empty screen. It has focus. Start Firefox by a key. It appears over the hexchat window, with DEMANDS_ATTENTION set and the task button flashing, but hexchat still has the input focus. Should focus be given immediately to an application which creates a new window with DEMANDS_ATTENTION set if ClickFocus is on? This appears to be a different issue than your first two bullet points of this issue. |
Well, I observed this with a custom GTK app too. And it's definitely what I tried to report (except the second bullet seems to be unrelated). The least common denominator of my observations is that both the originally active window and the newly created window are both by GTK. |
OK. Does the GTK also appear with DEMANDS_ATTENTION set? |
Couldn't reproduce it with GTK yet. (It happened fairly often, just not over the course of the last 5 weeks.) |
I finally caught GTK doing it again. The new window was not _NET_ACTIVE_WINDOW, but it had This is just a gtk window that's shown with gtk_widget_show_all() in reaction to keyboard input. |
You could experiment by setting "FocusOnAppRaise=1" in your preferences. |
WM_TRANSIENT_FOR was not set, WM_CLIENT_LEADER was the same. |
@wm4 If you try this can you look for "focus urgent group member" messages in icewm output? |
Where does icewm log to? Nothing in ~/.xsession-errors. Edit: I guess I'll first need to rebuild icewm with above commit. |
yes. If you press Cltr+Alt+space then you give a command like |
You could also set |
I've observed various problems with window focus order and keyboard input. I'm using the Debian package, which recently updated to a newer IceWM release from this repository. IceWM calls it "A new upstream snapshot (basically version 1.5.5 with fixes)"
At 1.4.3.0~pre-20181030-2 and maybe 1.5.5+git20190610-1 (I don't know yet):
At 1.5.5+git20190610-1 (new behavior):
I suspect all these are connected.
My configuration (excluding some irrelevant parts anyway) in
preferences
:There's also a
focus_mode
file, not sure if it's used at all:The text was updated successfully, but these errors were encountered: