win: track windows with a hash table

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-04-03 08:36:02 +01:00
parent 3935e97e69
commit a68903b9ef
10 changed files with 133 additions and 102 deletions

View File

@ -26,6 +26,7 @@
#include "string_utils.h"
#include "utils.h"
#include "win.h"
#include "uthash_extra.h"
#include "opengl.h"
@ -220,8 +221,9 @@ void glx_destroy(session_t *ps) {
return;
// Free all GLX resources of windows
for (win *w = ps->list; w; w = w->next)
WIN_STACK_ITER(ps, w) {
free_win_res_glx(ps, w);
}
// Free GLSL shaders/programs
for (int i = 0; i < MAX_BLUR_PASS; ++i) {