diff options
author | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
commit | aa7530630e595b80d5db54655fd827b61edc0fd7 (patch) | |
tree | 048cb74072450c7592f254c3537ac8f252d09d73 /hacks/glx/gltext.c | |
parent | Forgot one DPMS killing instance (diff) | |
parent | Update to 5.42 (diff) | |
download | xscreensaver-23.tar.gz xscreensaver-23.tar.xz xscreensaver-23.zip |
Merge branch 'master' into openslxv23
Diffstat (limited to 'hacks/glx/gltext.c')
-rw-r--r-- | hacks/glx/gltext.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/hacks/glx/gltext.c b/hacks/glx/gltext.c index 276c448..ab5a512 100644 --- a/hacks/glx/gltext.c +++ b/hacks/glx/gltext.c @@ -573,7 +573,7 @@ draw_text (ModeInfo *mi) if (!tp->glx_context) return; - glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(tp->glx_context)); + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *tp->glx_context); if (tp->reload) { @@ -650,8 +650,18 @@ ENTRYPOINT void free_text(ModeInfo * mi) { text_configuration *tp = &tps[MI_SCREEN(mi)]; + + if (!tp->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *tp->glx_context); + if (tp->tc) textclient_close (tp->tc); + if (tp->text) free (tp->text); + if (tp->trackball) gltrackball_free (tp->trackball); + if (tp->rot) free_rotator (tp->rot); + if (tp->rot2) free_rotator (tp->rot2); + if (tp->colors) free (tp->colors); + if (glIsList(tp->text_list)) glDeleteLists(tp->text_list, 1); } |