Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting with GNOME/gtk@dae4477 (v3.15.2) and ending with GNOME/gtk@1c55b32 (v4.3.2), GTK used glXGetConfig() to probe the OpenGL rendering attributes of all X visuals, it picked "system" (opaque) and "RGBA" (transparent) visuals based on those attributes, and it expected to find a GLX FB config with a GLX_VISUAL_ID attribute corresponding to one of those visuals. (The purpose of this was to ensure that GTK windows can always be used for OpenGL rendering, since the decision to enable OpenGL rendering may occur after the window is created.) Starting with GNOME/gtk@8c7623d (GTK v3.15.2) and ending with GNOME/gtk@62bac44 (GTK v4.3.2), GTK cached the system and RGBA visual IDs in an X root window property to avoid re-picking the visuals every time GTK was initialized on a particular X display. These mechanisms only worked reliably if there was a 1:1 correspondence between 2D X server visuals and GLX FB configs, which isn't the case with VirtualGL. More specifically, if GTK was initialized on the 2D X server without VirtualGL, then GTK used the 2D X server's GLX implementation to probe the OpenGL rendering attributes of the 2D X server visuals. That caused GTK to pick and cache different visuals than it would have picked had VirtualGL been active, and it was likely that none of the GLX FB configs returned by VirtualGL had a GLX_VISUAL_ID attribute corresponding to one of those visuals. The easiest workaround is for the VirtualGL Faker to delete the GDK_VISUALS X root window property in the body of XOpenDisplay(), thus forcing GTK to re-pick the system and RGBA visuals using VirtualGL's interposed version of glXGetConfig(). Fixes #158
- Loading branch information