Skip to content

work harder at keeping Bloom on-screen at wakeup (BL-16355)#7937

Closed
JohnThomson wants to merge 1 commit into
Version6.4from
windowPlacement
Closed

work harder at keeping Bloom on-screen at wakeup (BL-16355)#7937
JohnThomson wants to merge 1 commit into
Version6.4from
windowPlacement

Conversation

@JohnThomson

@JohnThomson JohnThomson commented May 29, 2026

Copy link
Copy Markdown
Contributor

This change is Reviewable

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/BloomExe/Shell.cs">

<violation number="1" location="src/BloomExe/Shell.cs:146">
P2: Don’t always unsubscribe on `OnHandleDestroyed`. Handle can be recreated. Then system-event hooks get removed and never come back. Guard this for real teardown only.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/BloomExe/Shell.cs

protected override void OnHandleDestroyed(EventArgs e)
{
UnsubscribeFromSystemWindowEvents();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Don’t always unsubscribe on OnHandleDestroyed. Handle can be recreated. Then system-event hooks get removed and never come back. Guard this for real teardown only.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/BloomExe/Shell.cs, line 146:

<comment>Don’t always unsubscribe on `OnHandleDestroyed`. Handle can be recreated. Then system-event hooks get removed and never come back. Guard this for real teardown only.</comment>

<file context>
@@ -138,6 +141,12 @@ protected override void OnHandleCreated(EventArgs e)
 
+        protected override void OnHandleDestroyed(EventArgs e)
+        {
+            UnsubscribeFromSystemWindowEvents();
+            base.OnHandleDestroyed(e);
+        }
</file context>
Suggested change
UnsubscribeFromSystemWindowEvents();
if (!RecreatingHandle)
UnsubscribeFromSystemWindowEvents();

@andrew-polk andrew-polk closed this Jun 8, 2026
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