From 95941a8fca886ba258716c535d51d0d68d075993 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sat, 18 Sep 2021 08:26:31 +0300 Subject: Tracking hover widget; cleanup The hover widget may get deleted during event processing, so Window keeps track of it for refreshing. TODO: Random crash when a destroyed menu is still in the onTop array (?). --- src/ui/window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/window.h') diff --git a/src/ui/window.h b/src/ui/window.h index a5b8f137..282e1682 100644 --- a/src/ui/window.h +++ b/src/ui/window.h @@ -86,6 +86,7 @@ struct Impl_Window { iRoot * roots[2]; /* root widget and UI state; second one is for split mode */ iRoot * keyRoot; /* root that has the current keyboard input focus */ iWidget * hover; + iWidget * lastHover; /* cleared if deleted */ iWidget * mouseGrab; iWidget * focus; float pixelRatio; /* conversion between points and pixels, e.g., coords, window size */ @@ -98,7 +99,6 @@ struct Impl_Window { SDL_Cursor * cursors[SDL_NUM_SYSTEM_CURSORS]; SDL_Cursor * pendingCursor; int loadAnimTimer; -// iAnim rootOffset; int keyboardHeight; /* mobile software keyboards */ }; -- cgit v1.2.3