{"action":"created","issue":{"url":"https://api.github.com/repos/i3/i3/issues/1990","labels_url":"https://api.github.com/repos/i3/i3/issues/1990/labels{/name}","comments_url":"https://api.github.com/repos/i3/i3/issues/1990/comments","events_url":"https://api.github.com/repos/i3/i3/issues/1990/events","html_url":"https://github.com/i3/i3/pull/1990","id":110876543,"number":1990,"title":"Flush cairo surface after drawing text.","user":{"login":"Airblader","id":2392216,"avatar_url":"https://avatars.githubusercontent.com/u/2392216?v=3","gravatar_id":"","url":"https://api.github.com/users/Airblader","html_url":"https://github.com/Airblader","followers_url":"https://api.github.com/users/Airblader/followers","following_url":"https://api.github.com/users/Airblader/following{/other_user}","gists_url":"https://api.github.com/users/Airblader/gists{/gist_id}","starred_url":"https://api.github.com/users/Airblader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Airblader/subscriptions","organizations_url":"https://api.github.com/users/Airblader/orgs","repos_url":"https://api.github.com/users/Airblader/repos","events_url":"https://api.github.com/users/Airblader/events{/privacy}","received_events_url":"https://api.github.com/users/Airblader/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-10-11T18:53:25Z","updated_at":"2015-10-14T07:33:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/i3/i3/pulls/1990","html_url":"https://github.com/i3/i3/pull/1990","diff_url":"https://github.com/i3/i3/pull/1990.diff","patch_url":"https://github.com/i3/i3/pull/1990.patch"},"body":"This is necessary to avoid a bug where a cairo assertion fails because no snapshot is available.\r\n\r\nfixes #1989"},"comment":{"url":"https://api.github.com/repos/i3/i3/issues/comments/147962582","html_url":"https://github.com/i3/i3/pull/1990#issuecomment-147962582","issue_url":"https://api.github.com/repos/i3/i3/issues/1990","id":147962582,"user":{"login":"psychon","id":89482,"avatar_url":"https://avatars.githubusercontent.com/u/89482?v=3","gravatar_id":"","url":"https://api.github.com/users/psychon","html_url":"https://github.com/psychon","followers_url":"https://api.github.com/users/psychon/followers","following_url":"https://api.github.com/users/psychon/following{/other_user}","gists_url":"https://api.github.com/users/psychon/gists{/gist_id}","starred_url":"https://api.github.com/users/psychon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psychon/subscriptions","organizations_url":"https://api.github.com/users/psychon/orgs","repos_url":"https://api.github.com/users/psychon/repos","events_url":"https://api.github.com/users/psychon/events{/privacy}","received_events_url":"https://api.github.com/users/psychon/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T07:33:38Z","updated_at":"2015-10-14T07:33:38Z","body":"I can reproduce this problem by running i3 under `xtrace --denyextensions`. However, first I run into https://github.com/i3/i3/issues/1983. So then I changed `i3bar_command` so that only i3bar gets all extensions disabled...\r\n\r\nAnyway, the bug is in cairo, it exists ever since cairo-xcb exists (I think...) and is now reported at https://bugs.freedesktop.org/show_bug.cgi?id=92455. The work-around (which I tested with i3bar, but it's not worth providing a patch for this) is to call `cairo_surface_flush()` twice in a row every time it is used. This makes the second call detach the snapshot that the first one added."}}