mirror of
https://github.com/got-feedBack/feedBack-desktop.git
synced 2026-09-10 23:04:09 +00:00
0cde745f03ad38134217721116d7bfe6270cdf89
The tray menu asked "do we own a window for this pane?" and then acted on the answer. Windows are destroyed asynchronously, so between the question and the act the answer can go stale: hasWindow() says yes, the window is destroyed, toggleWindow() returns false, the handler has already committed to the main-process path and returns — and the click lands on nothing. A tray item that silently does nothing is the worst possible failure here, because the tray IS the recovery path when a pane is out of sight. toggleWindow() already reports whether it did anything. Use that: if it toggled, we're done; if it didn't, we never had that window (or just lost it), and only the renderer can decide what opening the pane means — it might belong in the dock, and its element lives there. hasWindow()/hasPaneWindow() existed only to support the racy check, so they're gone rather than left lying around for someone to reintroduce the race with. Signed-off-by: topkoa <topkoa@gmail.com>
Languages
C++
52%
TypeScript
18.6%
JavaScript
17.9%
Shell
7.3%
CMake
2.4%
Other
1.8%