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/surfaces.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'hacks/glx/surfaces.c') diff --git a/hacks/glx/surfaces.c b/hacks/glx/surfaces.c index 4c79740..26439d5 100644 --- a/hacks/glx/surfaces.c +++ b/hacks/glx/surfaces.c @@ -46,7 +46,6 @@ "*showFPS: False \n" \ "*suppressRotationAnimation: True\n" \ -# define free_surface 0 # define release_surface 0 # include "xlockmore.h" /* from the xscreensaver distribution */ #else /* !STANDALONE */ @@ -429,7 +428,7 @@ ENTRYPOINT void reshape_surface(ModeInfo *mi, int width, int height) h = height / (GLfloat) width; } - glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(sp->glx_context)); + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *sp->glx_context); glViewport(0, y, (GLint) width, (GLint) height); glMatrixMode(GL_PROJECTION); @@ -634,7 +633,7 @@ ENTRYPOINT void draw_surface(ModeInfo * mi) glDrawBuffer(GL_BACK); - glXMakeCurrent(display, window, *(sp->glx_context)); + glXMakeCurrent(display, window, *sp->glx_context); draw(mi); if (mi->fps_p) do_fps(mi); @@ -643,6 +642,16 @@ ENTRYPOINT void draw_surface(ModeInfo * mi) } +ENTRYPOINT void free_surface(ModeInfo * mi) +{ + surfacestruct *sp = &surface[MI_SCREEN(mi)]; + if (!sp->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *sp->glx_context); + gltrackball_free (sp->trackball); + free_rotator (sp->rot); +} + + XSCREENSAVER_MODULE_2("Surfaces", surfaces, surface) #endif -- cgit v1.2.3-55-g7522