{"action":"created","issue":{"url":"https://api.github.com/repos/xmonad/xmonad-contrib/issues/192","repository_url":"https://api.github.com/repos/xmonad/xmonad-contrib","labels_url":"https://api.github.com/repos/xmonad/xmonad-contrib/issues/192/labels{/name}","comments_url":"https://api.github.com/repos/xmonad/xmonad-contrib/issues/192/comments","events_url":"https://api.github.com/repos/xmonad/xmonad-contrib/issues/192/events","html_url":"https://github.com/xmonad/xmonad-contrib/pull/192","id":234835850,"number":192,"title":"Resubmit #128 (X.H.Focus)","user":{"login":"sgf-dma","id":2964243,"avatar_url":"https://avatars0.githubusercontent.com/u/2964243?v=3","gravatar_id":"","url":"https://api.github.com/users/sgf-dma","html_url":"https://github.com/sgf-dma","followers_url":"https://api.github.com/users/sgf-dma/followers","following_url":"https://api.github.com/users/sgf-dma/following{/other_user}","gists_url":"https://api.github.com/users/sgf-dma/gists{/gist_id}","starred_url":"https://api.github.com/users/sgf-dma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgf-dma/subscriptions","organizations_url":"https://api.github.com/users/sgf-dma/orgs","repos_url":"https://api.github.com/users/sgf-dma/repos","events_url":"https://api.github.com/users/sgf-dma/events{/privacy}","received_events_url":"https://api.github.com/users/sgf-dma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-09T14:00:33Z","updated_at":"2017-06-10T15:25:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xmonad/xmonad-contrib/pulls/192","html_url":"https://github.com/xmonad/xmonad-contrib/pull/192","diff_url":"https://github.com/xmonad/xmonad-contrib/pull/192.diff","patch_url":"https://github.com/xmonad/xmonad-contrib/pull/192.patch"},"body":"Resubmit #128 with changes requested in #162 .\r\n\r\n@pjones , @geekosaur  Please, test and review.\r\n\r\n@SirBoonami , @unclechu Please, try updated version. Now `logHook` (instead of `manageHook`) runs for activated window. Thus, if you use this module for managing focus _only_ for activated windows, you need to add `FocusHook` to your `logHook`. E.g.\r\n\r\n    logHook = activateLogHook activateSwitchWs\r\n\r\nIf you use `FocusHook` for managing focus for _both_ new and activated windows, you need to add it to _both_. Either create two different `FocusHook`-s, e.g.:\r\n\r\n    let newFh :: ManageHook\r\n        newFh = manageFocus newFocusHook\r\n        acFh :: X ()\r\n        acFh = activateLogHook (manageFocus activateFocusHook)\r\n        xcf = ewmh $ def\r\n                     { manageHook   = newFh <+> manageHook def\r\n                     , logHook      = acFh  <+> logHook def\r\n                     }\r\n\r\nor (as was before) use the single `FocusHook` with `activated` predicate, e.g.:\r\n\r\n    let fh :: ManageHook\r\n        fh = manageFocus $ (composeOne\r\n                [ liftQuery activated -?> activateFocusHook\r\n                , Just <$> newFocusHook\r\n                ])\r\n        xcf = ewmh $ def\r\n                     { manageHook   = fh <+> manageHook def\r\n                     , logHook      = activateLogHook fh <+> logHook def\r\n                     }\r\n\r\nSee description for more examples and details.\r\n\r\n### Checklist\r\n\r\n  - [ ] I've read [CONTRIBUTING.md](https://github.com/xmonad/xmonad/blob/master/CONTRIBUTING.md)\r\n\r\n  - [x] I tested my changes with [xmonad-testing](https://github.com/xmonad/xmonad-testing)\r\n\r\n  - [x] I updated the `CHANGES.md` file\r\n"},"comment":{"url":"https://api.github.com/repos/xmonad/xmonad-contrib/issues/comments/307571756","html_url":"https://github.com/xmonad/xmonad-contrib/pull/192#issuecomment-307571756","issue_url":"https://api.github.com/repos/xmonad/xmonad-contrib/issues/192","id":307571756,"user":{"login":"unclechu","id":799353,"avatar_url":"https://avatars3.githubusercontent.com/u/799353?v=3","gravatar_id":"","url":"https://api.github.com/users/unclechu","html_url":"https://github.com/unclechu","followers_url":"https://api.github.com/users/unclechu/followers","following_url":"https://api.github.com/users/unclechu/following{/other_user}","gists_url":"https://api.github.com/users/unclechu/gists{/gist_id}","starred_url":"https://api.github.com/users/unclechu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unclechu/subscriptions","organizations_url":"https://api.github.com/users/unclechu/orgs","repos_url":"https://api.github.com/users/unclechu/repos","events_url":"https://api.github.com/users/unclechu/events{/privacy}","received_events_url":"https://api.github.com/users/unclechu/received_events","type":"User","site_admin":false},"created_at":"2017-06-10T15:25:58Z","updated_at":"2017-06-10T15:25:58Z","body":"@sgf-dma I have everything about focus-hook [here](https://github.com/unclechu/xmonadrc/blob/e5b05135446727eff13747c55808ffaa5157cb4c/xmonad/src/FocusHook.hs).\r\n\r\n> only for managing focus of new windows\r\n\r\nMaybe I misunderstand something, what do you mean by \"managing focus of **NOT** new windows\"? What I actually need (and already got) is:\r\n1. Prevent losing focus from windows of specific applications;\r\n2. Some applications should have hard priority for grabbing focus and should be able steal the focus notwithstanding item 1;\r\n3. Some applications creates child dialog windows, focus should move to dialog window if it belongs to same application;\r\n4. Hardcore mode for grabbing focus for current focused window."}}
{"actor":{"display_login":"unclechu"}}