{"action":"opened","issue":{"url":"https://api.github.com/repos/LemonBoy/bar/issues/163","labels_url":"https://api.github.com/repos/LemonBoy/bar/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/LemonBoy/bar/issues/163/comments","events_url":"https://api.github.com/repos/LemonBoy/bar/issues/163/events","html_url":"https://github.com/LemonBoy/bar/issues/163","id":126042467,"number":163,"title":"`-g` doesn't work as expected","user":{"login":"vain","id":82671,"avatar_url":"https://avatars.githubusercontent.com/u/82671?v=3","gravatar_id":"","url":"https://api.github.com/users/vain","html_url":"https://github.com/vain","followers_url":"https://api.github.com/users/vain/followers","following_url":"https://api.github.com/users/vain/following{/other_user}","gists_url":"https://api.github.com/users/vain/gists{/gist_id}","starred_url":"https://api.github.com/users/vain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vain/subscriptions","organizations_url":"https://api.github.com/users/vain/orgs","repos_url":"https://api.github.com/users/vain/repos","events_url":"https://api.github.com/users/vain/events{/privacy}","received_events_url":"https://api.github.com/users/vain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-11T21:37:30Z","updated_at":"2016-01-11T21:37:30Z","closed_at":null,"body":"I'm having trouble with `-g`. To illustrate, I added the following call to `fprintf()`:\r\n\r\n```diff\r\ndiff --git a/lemonbar.c b/lemonbar.c\r\nindex cfd4d9b..d5c1d55 100644\r\n--- a/lemonbar.c\r\n+++ b/lemonbar.c\r\n@@ -752,6 +752,8 @@ monitor_new (int x, int y, int width, int height)\r\n     ret->next = ret->prev = NULL;\r\n     ret->window = xcb_generate_id(c);\r\n \r\n+    fprintf(stderr, \"creating window at %d %d, %d %d\\n\", ret->x, ret->y, ret->width, bh);\r\n+\r\n     int depth = (visual == scr->root_visual) ? XCB_COPY_FROM_PARENT : 32;\r\n     xcb_create_window(c, depth, ret->window, scr->root,\r\n             ret->x, ret->y, width, bh, 0,\r\n```\r\n\r\nNow, let's say my screen setup is as follows:\r\n\r\n    HDMI1 connected primary 1024x768+0+0\r\n    VGA1 connected 1280x1024+1024+0\r\n\r\nIt seems to be important that the screen on the right is larger in height than the first screen.\r\n\r\nLet's run lemonbar:\r\n\r\n    $ ./lemonbar -dp -B '#ff0000' -g 1280x1+1024+768\r\n    creating window at 1024 768, 1280 1\r\n\r\nThis works as expected. I get a red line on the second monitor.\r\n\r\nNow let's increase the `y` coordinate by one pixel:\r\n\r\n    $ ./lemonbar -dp -B '#ff0000' -g 1280x1+1024+769\r\n    creating window at 2048 769, 256 1\r\n\r\nThat's a little strange, isn't it? `y` and `bh` are correct, but `x` and `w` are wrong.\r\n\r\nI can get the bar to show up at the desired coordinates by setting `x` to 0:\r\n\r\n    $ ./lemonbar -dp -B '#ff0000' -g 1280x1+0+769\r\n    creating window at 1024 769, 1280 1\r\n\r\nI'm sorry that I can't provide a patch yet. I don't fully understand what's going on in `monitor_create_chain()`.\r\n\r\nDo you have any ideas?\r\n\r\nThank you!\r\n"}}