From 90739659800c4bf893882098d70b575c26958883 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 4 Aug 2024 21:16:55 +0200 Subject: egl: fix transparent window --- src/mgl.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/mgl.c') diff --git a/src/mgl.c b/src/mgl.c index 6fd26a7..5a43427 100644 --- a/src/mgl.c +++ b/src/mgl.c @@ -99,16 +99,6 @@ int mgl_init(void) { void mgl_deinit(void) { if(init_count == 1) { - if(prev_xioerror) { - XSetIOErrorHandler(prev_xioerror); - prev_xioerror = NULL; - } - - if(prev_xerror) { - XSetErrorHandler(prev_xerror); - prev_xerror = NULL; - } - if(context.connection) { XCloseDisplay(context.connection); context.connection = NULL; @@ -120,6 +110,16 @@ void mgl_deinit(void) { mgl_gl_unload(&context.gl); } + if(prev_xioerror) { + XSetIOErrorHandler(prev_xioerror); + prev_xioerror = NULL; + } + + if(prev_xerror) { + XSetErrorHandler(prev_xerror); + prev_xerror = NULL; + } + context.current_window = NULL; } -- cgit v1.2.3