Commit bb24151
feat(examples/pysdl2): support multiple popup windows with clean shutdown
- Add MetaRenderHandler to dispatch CEF rendering callbacks (GetViewRect,
OnPaint, OnPopupShow/Size) to per-browser RenderHandler instances; SDL
popup windows are created lazily on the first GetViewRect call.
- Add LifeSpanHandler: OnBeforePopup configures each popup as offscreen;
OnBeforeClose tears down its SDL window and renderer via _close_popup().
- Add disable-popup-blocking CEF switch so window.open() popups are never
silently dropped regardless of user-activation token state.
- Route all input events (mouse, wheel, keyboard, text) to the correct
browser via a _browser_for(windowID) helper.
- Handle SDL_WINDOWEVENT_CLOSE on the main window: drain all popup browsers
before exiting so cef.Shutdown() is never blocked by live popup instances.
- Handle SDL_WINDOWEVENT_SIZE_CHANGED and SDL_WINDOWEVENT_CLOSE per-popup.
- Fix SyntaxWarning: invalid escape sequence \P in install docstring.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c6f2a56 commit bb24151
1 file changed
Lines changed: 329 additions & 100 deletions
0 commit comments