diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx index 8c14912f2..7d98d1696 100644 --- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx @@ -194,12 +194,13 @@ GLContext Fl_Wayland_Gl_Window_Driver::create_gl_context(Fl_Window* window, //fprintf(stderr, "eglCreateContext=%p shared_ctx=%p\n", ctx, shared_ctx); if (ctx) { add_context(ctx); - /* CONTROL_LEAKING_SUB_GL_WINDOWS - if (egl_surface) { + if (egl_surface && (mode() & FL_ALPHA)) { eglMakeCurrent(egl_display, egl_surface, egl_surface, (EGLContext)ctx); glClearColor(0., 0., 0., 1.); // set opaque black as starting background color + /* CONTROL_LEAKING_SUB_GL_WINDOWS apply_scissor(); - }*/ + */ + } } return ctx; }