{"action":"created","issue":{"url":"https://api.github.com/repos/jordansissel/xdotool/issues/79","repository_url":"https://api.github.com/repos/jordansissel/xdotool","labels_url":"https://api.github.com/repos/jordansissel/xdotool/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/jordansissel/xdotool/issues/79/comments","events_url":"https://api.github.com/repos/jordansissel/xdotool/issues/79/events","html_url":"https://github.com/jordansissel/xdotool/issues/79","id":108074799,"number":79,"title":"is there any way to use xdotool  with window id like: 0x240008a?","user":{"login":"piotrekkr","id":503782,"avatar_url":"https://avatars.githubusercontent.com/u/503782?v=3","gravatar_id":"","url":"https://api.github.com/users/piotrekkr","html_url":"https://github.com/piotrekkr","followers_url":"https://api.github.com/users/piotrekkr/followers","following_url":"https://api.github.com/users/piotrekkr/following{/other_user}","gists_url":"https://api.github.com/users/piotrekkr/gists{/gist_id}","starred_url":"https://api.github.com/users/piotrekkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piotrekkr/subscriptions","organizations_url":"https://api.github.com/users/piotrekkr/orgs","repos_url":"https://api.github.com/users/piotrekkr/repos","events_url":"https://api.github.com/users/piotrekkr/events{/privacy}","received_events_url":"https://api.github.com/users/piotrekkr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-24T07:33:34Z","updated_at":"2016-05-06T14:24:41Z","closed_at":null,"body":"I'm trying to send `ctrl+q`  keystroke to thunderbird which is hidden inside systray. `xdotool` is not seeing thunderbird when it is inside systray (window state withdrawn) so this does not return window ID:\r\n\r\n    $ xdotool seatch --desktop 0 --class \"thunderbird\"\r\n\r\n    $ xprop -id 0x240008a | grep state                  \r\n                    window state: Withdrawn\r\n                    Initial state is Normal State.\r\n\r\nIt only works when there is a taskbar entry for thunderbird.\r\n\r\nI also tried searching by PID:\r\n\r\n    $ xdotool search --any --pid 3489 --name 'not existing name'\r\n    37748737\r\n    37748842\r\n    37748879\r\n    37748880\r\n    37748881\r\n    37748894\r\n    37748912\r\n    37748919\r\n    37748922\r\n    37748925\r\n    37748928\r\n    37748935\r\n    37750322\r\n    37751934\r\n    37748874\r\n\r\nBut this does not work:\r\n\r\n    $ xdotool search --any --pid 3489 --name 'not existing name' windowactivate --sync key ctrl+q \r\n    XGetWindowProperty[_NET_WM_DESKTOP] failed (code=1)\r\n\r\nI'm wondering if there is some kind of option to give `xdotool`  the window ID acquired using `xwininfo`? Something like:\r\n\r\n    xdotool search --id 0x3400001 \r\n\r\nor \r\n\r\n    xdotool windowactivate --id 0x3400001\r\n\r\nThanks "},"comment":{"url":"https://api.github.com/repos/jordansissel/xdotool/issues/comments/217453841","html_url":"https://github.com/jordansissel/xdotool/issues/79#issuecomment-217453841","issue_url":"https://api.github.com/repos/jordansissel/xdotool/issues/79","id":217453841,"user":{"login":"richelbilderbeek","id":2098230,"avatar_url":"https://avatars.githubusercontent.com/u/2098230?v=3","gravatar_id":"","url":"https://api.github.com/users/richelbilderbeek","html_url":"https://github.com/richelbilderbeek","followers_url":"https://api.github.com/users/richelbilderbeek/followers","following_url":"https://api.github.com/users/richelbilderbeek/following{/other_user}","gists_url":"https://api.github.com/users/richelbilderbeek/gists{/gist_id}","starred_url":"https://api.github.com/users/richelbilderbeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richelbilderbeek/subscriptions","organizations_url":"https://api.github.com/users/richelbilderbeek/orgs","repos_url":"https://api.github.com/users/richelbilderbeek/repos","events_url":"https://api.github.com/users/richelbilderbeek/events{/privacy}","received_events_url":"https://api.github.com/users/richelbilderbeek/received_events","type":"User","site_admin":false},"created_at":"2016-05-06T14:24:41Z","updated_at":"2016-05-06T14:24:41Z","body":"I noticed that the conversion to decimal is redundant (see [a tutorial of mine](https://github.com/richelbilderbeek/testing_cpp_gui_applications_tutorial/commits?author=richelbilderbeek))\r\n\r\nHere is my bash function how to extract a window ID from `wmctrl`:\r\n```\r\n#!/bin/bash\r\n\r\n# Get the ID of the *first* window with the arguments\r\n# as its window title\r\n\r\nfunction get_dialog_id\r\n{\r\n  echo `wmctrl -l | egrep \"$*\" | head -n 1 | cut -f 1 -d ' '`\r\n}\r\n```\r\n\r\nI can then feed it to `xdotool` like:\r\n\r\n```\r\nid=`get_dialog_id \"$@\"`\r\nxdotool windowactivate $id sleep 0.1 key alt+F4\r\n```"}}