When a new program is started, icewm sometimes fails to properly focus it. A way for me to reproduce 100%:
- Start audacious (music player) on desktop 1
- Press Ctrl+J, an audacious dialog window appears
- Switch to desktop 2, by keyboard or mouse, doesn't matter.
- I press the key Ctrl+Alt+a which I have defined as:
key "Ctrl+Alt+a" xfce4-terminal
Or I start a terminal from the menu or start a terminal from the quicklaunch, it doesn't matter.
- The new terminal window does not get focus, it does have the urgency bit set and starts flashing in the taskbar.
The same problem happens with firefox or chromium and seems to happen when there is already a firefox or chromium window running somewhere and a new window is opened.
This problem does not happen in icewm 1.3.8. I've tracked it down to commit a57ec4f. The following patch fixes the problem for me. It's a terrible patch because it completely ignores the new timing code but my X knowledge is too limited to completely understand the code in updateNetWMUserTime
--- icewm-1.3.10.bak/src/wmframe.cc 2015-07-03 03:38:11.000000000 +0200
+++ icewm-1.3.10/src/wmframe.cc 2015-08-15 12:15:08.763321027 +0200
@@ -1851,9 +1851,9 @@
doActivate = false;
}
- if (fUserTime != -1UL)
+/* if (fUserTime != -1UL)
if (fUserTime == 0 || fUserTime != manager->lastUserTime())
- doActivate = false;
+ doActivate = false;*/
}
void YFrameWindow::wmShow() {
When a new program is started, icewm sometimes fails to properly focus it. A way for me to reproduce 100%:
key "Ctrl+Alt+a" xfce4-terminalOr I start a terminal from the menu or start a terminal from the quicklaunch, it doesn't matter.
The same problem happens with firefox or chromium and seems to happen when there is already a firefox or chromium window running somewhere and a new window is opened.
This problem does not happen in icewm 1.3.8. I've tracked it down to commit a57ec4f. The following patch fixes the problem for me. It's a terrible patch because it completely ignores the new timing code but my X knowledge is too limited to completely understand the code in updateNetWMUserTime