From ae69a754244c4e475c8d2591772ca8e005071d83 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 18 Feb 2019 11:55:41 +0100 Subject: Update to 5.42 --- hacks/glx/kaleidocycle.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'hacks/glx/kaleidocycle.c') diff --git a/hacks/glx/kaleidocycle.c b/hacks/glx/kaleidocycle.c index 884400f..b3a7fee 100644 --- a/hacks/glx/kaleidocycle.c +++ b/hacks/glx/kaleidocycle.c @@ -21,7 +21,6 @@ "*wireframe: False \n" \ "*suppressRotationAnimation: True\n" \ -# define free_kaleidocycle 0 # define release_kaleidocycle 0 #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) @@ -414,7 +413,7 @@ draw_kaleidocycle (ModeInfo *mi) if (!bp->glx_context) return; - glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(bp->glx_context)); + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -569,6 +568,19 @@ draw_kaleidocycle (ModeInfo *mi) glXSwapBuffers(dpy, window); } + +ENTRYPOINT void +free_kaleidocycle (ModeInfo *mi) +{ + kaleidocycle_configuration *bp = &bps[MI_SCREEN(mi)]; + if (!bp->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context); + if (bp->trackball) gltrackball_free (bp->trackball); + if (bp->rot) free_rotator (bp->rot); + if (bp->rot2) free_rotator (bp->rot2); + if (bp->colors) free (bp->colors); +} + XSCREENSAVER_MODULE ("Kaleidocycle", kaleidocycle) #endif /* USE_GL */ -- cgit v1.2.3-55-g7522