{"action":"created","issue":{"url":"https://api.github.com/repos/bbidulock/icewm/issues/37","repository_url":"https://api.github.com/repos/bbidulock/icewm","labels_url":"https://api.github.com/repos/bbidulock/icewm/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/bbidulock/icewm/issues/37/comments","events_url":"https://api.github.com/repos/bbidulock/icewm/issues/37/events","html_url":"https://github.com/bbidulock/icewm/issues/37","id":101162435,"number":37,"title":"Sometimes no focus on new window","user":{"login":"williex","id":13808598,"avatar_url":"https://avatars.githubusercontent.com/u/13808598?v=3","gravatar_id":"","url":"https://api.github.com/users/williex","html_url":"https://github.com/williex","followers_url":"https://api.github.com/users/williex/followers","following_url":"https://api.github.com/users/williex/following{/other_user}","gists_url":"https://api.github.com/users/williex/gists{/gist_id}","starred_url":"https://api.github.com/users/williex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/williex/subscriptions","organizations_url":"https://api.github.com/users/williex/orgs","repos_url":"https://api.github.com/users/williex/repos","events_url":"https://api.github.com/users/williex/events{/privacy}","received_events_url":"https://api.github.com/users/williex/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bbidulock/icewm/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"bbidulock","id":5490751,"avatar_url":"https://avatars.githubusercontent.com/u/5490751?v=3","gravatar_id":"","url":"https://api.github.com/users/bbidulock","html_url":"https://github.com/bbidulock","followers_url":"https://api.github.com/users/bbidulock/followers","following_url":"https://api.github.com/users/bbidulock/following{/other_user}","gists_url":"https://api.github.com/users/bbidulock/gists{/gist_id}","starred_url":"https://api.github.com/users/bbidulock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbidulock/subscriptions","organizations_url":"https://api.github.com/users/bbidulock/orgs","repos_url":"https://api.github.com/users/bbidulock/repos","events_url":"https://api.github.com/users/bbidulock/events{/privacy}","received_events_url":"https://api.github.com/users/bbidulock/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-08-15T10:48:38Z","updated_at":"2016-05-03T05:27:03Z","closed_at":null,"body":"When a new program is started, icewm sometimes fails to properly focus it. A way for me to reproduce 100%:\r\n1. Start audacious (music player) on desktop 1\r\n2. Press Ctrl+J, an audacious dialog window appears\r\n3. Switch to desktop 2, by keyboard or mouse, doesn't matter.\r\n4. I press the key Ctrl+Alt+a which I have defined as:\r\n```key \"Ctrl+Alt+a\"              xfce4-terminal```\r\nOr I start a terminal from the menu or start a terminal from the quicklaunch, it doesn't matter.\r\n5. The new terminal window does not get focus, it does have the urgency bit set and starts flashing in the taskbar.\r\n\r\nThe 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.\r\n\r\nThis 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\r\n\r\n```\r\n--- icewm-1.3.10.bak/src/wmframe.cc 2015-07-03 03:38:11.000000000 +0200\r\n+++ icewm-1.3.10/src/wmframe.cc 2015-08-15 12:15:08.763321027 +0200\r\n@@ -1851,9 +1851,9 @@\r\n             doActivate = false;\r\n     }\r\n\r\n-    if (fUserTime != -1UL)\r\n+/*    if (fUserTime != -1UL)\r\n         if (fUserTime == 0 || fUserTime != manager->lastUserTime())\r\n-            doActivate = false;\r\n+            doActivate = false;*/\r\n }\r\n\r\n void YFrameWindow::wmShow() {\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bbidulock/icewm/issues/comments/216441960","html_url":"https://github.com/bbidulock/icewm/issues/37#issuecomment-216441960","issue_url":"https://api.github.com/repos/bbidulock/icewm/issues/37","id":216441960,"user":{"login":"bedna-KU","id":4377084,"avatar_url":"https://avatars.githubusercontent.com/u/4377084?v=3","gravatar_id":"","url":"https://api.github.com/users/bedna-KU","html_url":"https://github.com/bedna-KU","followers_url":"https://api.github.com/users/bedna-KU/followers","following_url":"https://api.github.com/users/bedna-KU/following{/other_user}","gists_url":"https://api.github.com/users/bedna-KU/gists{/gist_id}","starred_url":"https://api.github.com/users/bedna-KU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bedna-KU/subscriptions","organizations_url":"https://api.github.com/users/bedna-KU/orgs","repos_url":"https://api.github.com/users/bedna-KU/repos","events_url":"https://api.github.com/users/bedna-KU/events{/privacy}","received_events_url":"https://api.github.com/users/bedna-KU/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T05:27:03Z","updated_at":"2016-05-03T05:27:03Z","body":"I have on other computer IceWM 1.3.12.32 and focus work fine. (only roxterm not gained focus)"}}