On Mon Jan 6 16:14:33 2025 +0000, Paul Gofman wrote:
... or otherwise it needs this logic from present_gl_drawable() to be factored out in a separate function:
if (!gl) return; switch (gl->type) { case DC_GL_PIXMAP_WIN: drawable = gl->pixmap; break; case DC_GL_CHILD_WIN: drawable = gl->window; break; default: drawable = 0; break; } if (!drawable) return;
Which would essentially mean reverting 73453e9442fea9fffcbba6bde49c0931f05579df , but it seems to me even with the extra flag avoiding repeating all of that in 3 functions is better?
Ah sorry, I missed the early return. This is why I really don't like the style of putting the body on the same line as the if...