X11: Pick better system and rgba visuals for GL

We want to create windows with the default visuals such that we then
have the right visual for GLX when we want to create the paint GL
context for the window.

For instance, (in bug 738670) the default rgba visual we picked for the
NVidia driver had an alpha size of 0 which gave us a BadMatch when later
trying to initialize a gl context on it with a alpha FBConfig.

Instead of just picking what the Xserver likes for the default, and just
picking the first rgba visual we now actually call into GLX to pick
an appropriate visual.
This commit is contained in:
Alexander Larsson
2014-10-29 12:35:07 +01:00
parent 8765970ba1
commit dae447728d
5 changed files with 187 additions and 6 deletions

View File

@ -113,6 +113,7 @@ GdkScreen * _gdk_x11_screen_new (GdkDisplay *display,
gint screen_number);
void _gdk_x11_screen_setup (GdkScreen *screen);
void _gdk_x11_screen_update_visuals_for_gl (GdkScreen *screen);
void _gdk_x11_screen_window_manager_changed (GdkScreen *screen);
void _gdk_x11_screen_size_changed (GdkScreen *screen,
XEvent *event);