Skip to content

x11: Use the GLXFBConfig to set the visual of an OpenGL canvas#364

Merged
mflatt merged 1 commit intoracket:masterfrom
lexi-lambda:x11-set-gl-canvas-visual
Mar 23, 2026
Merged

x11: Use the GLXFBConfig to set the visual of an OpenGL canvas#364
mflatt merged 1 commit intoracket:masterfrom
lexi-lambda:x11-set-gl-canvas-visual

Conversation

@lexi-lambda
Copy link
Copy Markdown
Member

Currently, when creating an OpenGL canvas% under X11, racket/gui does not properly arrange for the X window’s Visual to be the one GLX selects for a given GLXFBConfig. Without doing this, GLX may silently fall back to a more limited config, which prevents certain features from working correctly (most notably multisampling). This PR fixes the issue by explicitly setting the GTK widget’s visual before it is realized, which ensures the X window’s visual will be initialized appropriately.

Without doing this, the visual will not necessarily match that required
by GLX, which prevents certain features from working correctly, most
notably multisampling.
@lexi-lambda lexi-lambda force-pushed the x11-set-gl-canvas-visual branch from 9e8d7e7 to 92731f6 Compare March 17, 2026 00:57
@mflatt
Copy link
Copy Markdown
Member

mflatt commented Mar 21, 2026

Thanks! This looks very plausible to me, but I have not yet had a chance to try it out. I expect to take a closer look soon.

@mflatt mflatt merged commit ff003fb into racket:master Mar 23, 2026
1 of 2 checks passed
@lexi-lambda lexi-lambda deleted the x11-set-gl-canvas-visual branch March 24, 2026 15:47
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.

2 participants