From 65deeb76e660bad85ac60b042e0504b9ebde5305 Mon Sep 17 00:00:00 2001 From: s4my Date: Thu, 2 Nov 2023 03:14:41 +0100 Subject: [PATCH] fix: make sure the close the context menu when the window loses focus. --- luigi2.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/luigi2.h b/luigi2.h index 80e6c1d..934b3ad 100644 --- a/luigi2.h +++ b/luigi2.h @@ -5750,6 +5750,9 @@ bool _UIProcessEvent(XEvent *event) { if (!window) return false; window->ctrl = window->shift = window->alt = false; UIElementMessage(&window->e, UI_MSG_WINDOW_ACTIVATE, 0, 0); + } else if (event->type == FocusOut || event->type == ResizeRequest) { + _UIMenusClose(); + _UIUpdate(); } else if (event->type == ClientMessage && event->xclient.message_type == ui.dndEnterID) { UIWindow *window = _UIFindWindow(event->xclient.window); if (!window) return false;