{"action":"opened","issue":{"url":"https://api.github.com/repos/awesomeWM/awesome/issues/182","labels_url":"https://api.github.com/repos/awesomeWM/awesome/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/awesomeWM/awesome/issues/182/comments","events_url":"https://api.github.com/repos/awesomeWM/awesome/issues/182/events","html_url":"https://github.com/awesomeWM/awesome/issues/182","id":65010884,"number":182,"title":"mod-j/k problems with HeidiSQL (main window 1x1 pixel, focuses its dialog)","user":{"login":"blueyed","id":9766,"avatar_url":"https://avatars.githubusercontent.com/u/9766?v=3","gravatar_id":"","url":"https://api.github.com/users/blueyed","html_url":"https://github.com/blueyed","followers_url":"https://api.github.com/users/blueyed/followers","following_url":"https://api.github.com/users/blueyed/following{/other_user}","gists_url":"https://api.github.com/users/blueyed/gists{/gist_id}","starred_url":"https://api.github.com/users/blueyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueyed/subscriptions","organizations_url":"https://api.github.com/users/blueyed/orgs","repos_url":"https://api.github.com/users/blueyed/repos","events_url":"https://api.github.com/users/blueyed/events{/privacy}","received_events_url":"https://api.github.com/users/blueyed/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-29T01:39:05Z","updated_at":"2015-03-29T01:39:05Z","closed_at":null,"body":"[This was originally reported in the old bugtracker ([FS#1284](https://awesome.naquadah.org/bugs/index.php?do=details&task_id=1284)).]\r\n\r\n1. HeidiSQL (download at http://www.heidisql.com/download.php) breaks Mod+J:\r\nthe focus cannot be moved away from the HeidiSQL window. The taskbar entry flashes, but does not move to the next client.\r\n\r\n2. When moving to the HeidiSQL client with Mod+K, the client window does not get raised properly: it gets the focus, but stays in the background.\r\n\r\nThis requires you to use combinations of mod+j and mod+k to move away or select the client window.\r\n\r\nThe relevant properties of the dialog (\"Session manager\") are:\r\n\r\n    WM_STATE(WM_STATE):\r\n                    window state: Normal\r\n                    icon window: 0x0\r\n    _NET_WM_STATE(ATOM) = _NET_WM_STATE_SKIP_TASKBAR\r\n    _NET_WM_NAME(UTF8_STRING) = \"Session manager\"\r\n    WM_ICON_NAME(STRING) = \"Session manager\"\r\n    WM_NAME(STRING) = \"Session manager\"\r\n    WM_HINTS(WM_HINTS):\r\n                    Client accepts input or input focus: False\r\n                    Initial state is Normal State.\r\n                    bitmap id # to use for icon: 0x58009dc\r\n                    bitmap id # of mask for icon: 0x58009de\r\n                    window id # of group leader: 0x5a00003\r\n    _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL\r\n    WM_TRANSIENT_FOR(WINDOW): window id # 0x5a00003\r\n    _MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x26, 0x1e, 0x114400, 0x10500\r\n    WM_NORMAL_HINTS(WM_SIZE_HINTS):\r\n                    program specified location: 371, 154\r\n                    window gravity: Static\r\n    _NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x5800030\r\n    XdndAware(ATOM) = ATOM\r\n    _NET_WM_PID(CARDINAL) = 15842\r\n    WM_LOCALE_NAME(STRING) = \"en_US.UTF-8\"\r\n    WM_CLIENT_MACHINE(STRING) = \"lenny.thequod.de\"\r\n    WM_CLASS(STRING) = \"heidisql.exe\", \"Wine\"\r\n    WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING, WM_TAKE_FOCUS\r\n\r\n\r\nAnd the main window:\r\n\r\n    WM_STATE(WM_STATE):\r\n                    window state: Normal\r\n                    icon window: 0x0\r\n    _NET_WM_NAME(UTF8_STRING) = \"HeidiSQL\"\r\n    WM_ICON_NAME(STRING) = \"HeidiSQL\"\r\n    WM_NAME(STRING) = \"HeidiSQL\"\r\n    WM_HINTS(WM_HINTS):\r\n                    Client accepts input or input focus: False\r\n                    Initial state is Normal State.\r\n                    bitmap id # to use for icon: 0x5800056\r\n                    bitmap id # of mask for icon: 0x5800058\r\n                    window id # of group leader: 0x5a00003\r\n    _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL\r\n    _MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x2c, 0x0, 0x67c10, 0x40100\r\n    WM_NORMAL_HINTS(WM_SIZE_HINTS):\r\n                    program specified location: 684, 385\r\n                    program specified minimum size: 1 by 1\r\n                    program specified maximum size: 1 by 1\r\n                    window gravity: Static\r\n    _NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x5800030\r\n    XdndAware(ATOM) = ATOM\r\n    _NET_WM_PID(CARDINAL) = 15842\r\n    WM_CLASS(STRING) = \"heidisql.exe\", \"Wine\"\r\n    WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING, WM_TAKE_FOCUS\r\n\r\nSo the actual window (\"Session manager\") has skip_taskbar and the main window\r\nhas a size of 1x1.\r\n\r\nThis works, because transient windows are stacked above their parents.\r\n\r\nbtw: c.focusable is True for both windows, despite the \"Client accepts input or\r\ninput focus: False\" for the dialog.  But that may be something different then?!\r\n\r\nThere are two issues here:\r\n\r\n1. The parent window should be highlighted in the taskbar.  This can be fixed\r\n   in the tasklist module.\r\n2. client.next() needs to handle this special case.\r\n\r\nRe 2: when the main window is focused, it appears to send an event to\r\nfocus the \"dialog\".  The following is the output from some added print/printf statements:\r\n\r\n    == mod-j pressed\r\n    == focus.byidx: 1 c=nil ==\r\n    INSERT: window/client(Session manager): 0x1dbf198\r\n    INSERT: window/client(HeidiSQL): 0x2222518\r\n    sel: window/client(Session manager): 0x1dbf198\r\n    cycle: 2\r\n    focus.byidx: window/client(HeidiSQL): 0x2222518\r\n    client_focus: HeidiSQL\r\n    globalconf.focus.client: HeidiSQL\r\n    == mod-j end\r\n    client_focus_refresh: HeidiSQL (win: 148)\r\n    event_handle_focusin: Session manager\r\n    client_focus_update: Session manager\r\n    client_unfocus_internal: HeidiSQL\r\n    globalconf.focus.client: Session manager\r\n\r\nI am not sure about how this should get handled.\r\n`client.focus.byidx` is not able to check if the focus was changed back, because\r\nthis happens later (after `client_focus_refresh`)."}}