Skip to content

Fix BView detach callback dispatch - #18

Open
cyberman wants to merge 1 commit into
coolcoder613eb:mainfrom
Be-Quiet-Home:fix-bview-detach-callbacks
Open

Fix BView detach callback dispatch#18
cyberman wants to merge 1 commit into
coolcoder613eb:mainfrom
Be-Quiet-Home:fix-bview-detach-callbacks

Conversation

@cyberman

@cyberman cyberman commented Jul 28, 2026

Copy link
Copy Markdown

Problem

The BView trampolines for DetachedFromWindow() and AllDetached() both dispatch to the Python AllAttached() override.

Python subclasses therefore receive the wrong lifecycle callback when a view is detached.

Fix

Dispatch each trampoline to its matching Python override.

Validation

Verified that the bound base methods now invoke DetachedFromWindow() followed by AllDetached().

Dispatch DetachedFromWindow and AllDetached to their matching Python overrides instead of AllAttached.

Add a regression test that exercises both C++ trampoline paths and verifies the callbacks received by a Python BView subclass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants