mirror of
https://github.com/got-feedBack/feedBack-desktop.git
synced 2026-09-10 22:14:10 +00:00
938ddded6059006a349a71d04f16ffbb5e1ee2c7
Follows the core change: a pane is now the plugin's REAL panel element, moved into the pop-out window and still running the plugin's own code (got-feedback/feedback#928). That forces one thing here, and it is worth being loud about it: WE MUST NOT CREATE THE PANE WINDOW. To move a live DOM node into another window, the renderer needs a handle on that window's document. A BrowserWindow we construct in the main process gives it no such handle. So the renderer opens the window itself with window.open(), Electron's setWindowOpenHandler turns that into a real BrowserWindow anyway, and we recognise it in did-create-window by the frame name the renderer gave it (`fbpane-<paneId>`) and attach the OS behaviour: remembered bounds, off the taskbar, minimize-to-tray, listed in the tray. Create the window here instead and the whole feature collapses back into "reimplement the panel in the pop-out and sync it over IPC" — which is exactly what we just deleted. The IPC surface shrinks to two channels, because main never creates or destroys a pane window and never looks inside one: pane:sync renderer → main the registry, so the tray can list panes pane:toggle main → renderer the tray asking for a pane; only the renderer knows what opening one means (it might belong in the dock, and its element lives there) Gone: pane:open, pane:close, pane:focus, pane:setAlwaysOnTop, pane:closed. The renderer holds the WindowProxy for a window it opened, so it already knows when the user closes it — and it has to, because its element is inside and must be brought home. 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%