aboutsummaryrefslogtreecommitdiff
path: root/src/mgl.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-04 21:16:55 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-04 21:16:55 +0200
commit90739659800c4bf893882098d70b575c26958883 (patch)
treed36299593d9900217d55f6926bf6459c954ba6e3 /src/mgl.c
parent1636127a6edfbf5399d1706c1a6c58f87eeb5c79 (diff)
egl: fix transparent window
Diffstat (limited to 'src/mgl.c')
-rw-r--r--src/mgl.c20
1 files changed, 10 insertions, 10 deletions
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;
}