-
Notifications
You must be signed in to change notification settings - Fork 18k
x/mobile/app: need to pass a private colormap to XCreateWindow in x11.c #9997
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
Comments
/cc @nigeltao |
I'm happy to take a patch a la https://golang.org/doc/contribute.html but I can't repro the bug myself so can't be sure that whatever I write will fix anything. Out of curiousity, what sort of X11 configuration leads to this situation? |
It's a pretty bog standard Ubuntu 14/04 config with the Nvidia 340 binary drivers. The examples used to work when I tested right after Go 1.4 got released, but not anymore, and I really couldn't say what has changed on my system since then. Anyhow, when I debugged this issue, EGL returned visual id 0x27 while the default is 0x21, as reported by xdpyinfo:
There's probably more to it, but they look the same. Adding the colormap is straightforward, but I ran into another issue with the basic example that crashes somewhere in gl.DrawArrays(), so I want to investigate this further before submitting a patch (I don't see how adding a true color colormap could cause this, but one never knows). The sprite example runs fine though. |
CL submitted: https://go-review.googlesource.com/6260 For future reference, people affected by this issue will get the following error message:
Also the problem I was experiencing with the basic example is unrelated. It was caused by #9534. |
This was fixed by https://go-review.googlesource.com/#/c/6260/ but the CL description said issue #9997 instead of #9997. |
When the preferred visual returned by EGL is different from the parent window's visual, a private colormap is needed in the call to XCreateWindow (see X server source code http://cgit.freedesktop.org/xorg/xserver/tree/dix/window.c#n708).
This seems to be a known issue as some of the proposed fixes for other issues also include a fix for this (see for example https://github.com/capnm/mobile/blob/patch-1/app/x11.c#L49), but haven't seen it formally reported, so here it is.
The text was updated successfully, but these errors were encountered: