Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check cairo supports x11 server #4434

Open
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

psychon
Copy link
Contributor

@psychon psychon commented Jun 2, 2021

This is a new version of #4433. Sorry for accidentally closing that PR. Since GitHub did not see the newest commits, I wanted to force-push something else and then push the current state of the branch again. Turns out that pushing next automatically closed the PR with no way to opening again (or at least I am not seeing the way).

@psychon
Copy link
Contributor Author

psychon commented Jun 2, 2021

#   Failed test 'Received 1 workspace::init event'
#   at /usr/src/i3/distbuild/meson-private/dist-unpack/i3-4.19.2/testcases/t/533-randr15.t line 141.
#          got: '0'
#     expected: '1'

#   Failed test 'Workspace initialized in up2414q'
#   at /usr/src/i3/distbuild/meson-private/dist-unpack/i3-4.19.2/testcases/t/533-randr15.t line 142.
#          got: undef
#     expected: 'up2414q'

Uhm... since this test failure only occurred with gcc and not with clang, I am going to assume that this is just a flaky test and not caused by this PR.

This commits adds code to create a cairo surface for the root window
during startup. If this check fails, i3 fails with an error message,
because it is very likely that all rendering will fail later on.

I only say "very likely", because for later drawing a visual is selected
by get_visualtype_by_id(get_visualid_by_depth(win_depth)), i.e.
depending on the depth of actual windows. This can still end up picking
a visual that cairo cannot work with. However, if cairo cannot even work
with the root window's visual, it is very likely that everything else
will also fail. Thus, this check should at least help somewhat.

Signed-off-by: Uli Schlachter <psychon@znc.in>
A X11 server with a bit depth of eight is highly unusual and is likely
not supported by most code out there, including cairo. Just 256 colors?!
Thus, this commit changes complete-run.pl to use the more usual depth of
24. This makes Xvfb use 32 bits per pixel, which is also "more usual".

Signed-off-by: Uli Schlachter <psychon@znc.in>
@orestisfl orestisfl force-pushed the check-cairo-supports-X11-server branch from 0952437 to f7e4f4e Compare September 9, 2021 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant