From 7b689dbf576eeaafdde87fa2deddd6f616406982 Mon Sep 17 00:00:00 2001 From: Kycilak <105238216+Kycilak@users.noreply.github.com> Date: Tue, 16 Jan 2024 13:26:39 +0100 Subject: [PATCH] Fix #58 --- mlx_loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlx_loop.c b/mlx_loop.c index cc4e119..471d03a 100644 --- a/mlx_loop.c +++ b/mlx_loop.c @@ -52,7 +52,7 @@ int mlx_loop(t_xvar *xvar) if (win && ev.type == ClientMessage && ev.xclient.message_type == xvar->wm_protocols && ev.xclient.data.l[0] == xvar->wm_delete_window && win->hooks[DestroyNotify].hook) win->hooks[DestroyNotify].hook(win->hooks[DestroyNotify].param); - if (win && ev.type < MLX_MAX_EVENT && win->hooks[ev.type].hook) + else if (win && ev.type < MLX_MAX_EVENT && win->hooks[ev.type].hook) mlx_int_param_event[ev.type](xvar, &ev, win); } XSync(xvar->display, False);