Skip to content

Fix stubbed Fyne Run to block until windows close#14

Merged
VectoDE merged 1 commit intomainfrom
codex/fix-high-priority-bug-in-fyne-stub
Oct 21, 2025
Merged

Fix stubbed Fyne Run to block until windows close#14
VectoDE merged 1 commit intomainfrom
codex/fix-high-priority-bug-in-fyne-stub

Conversation

@VectoDE
Copy link
Owner

@VectoDE VectoDE commented Oct 21, 2025

Summary

  • make the stubbed fyne.App implementation track windows and block Run until the last window closes
  • ensure stubbed windows close idempotently and notify the app so builds behave like the real GUI loop

Testing

  • go build ./...
  • go build -tags desktop ./...

https://chatgpt.com/codex/tasks/task_e_68f7d743b130832cab2b911a13d6e4c2

@VectoDE VectoDE changed the base branch from codex/fix-missing-go.sum-entries-for-fyne-packages to main October 21, 2025 19:02
@VectoDE VectoDE merged commit 5bf5f29 into main Oct 21, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 128 to +144
func (w *stubWindow) Close() {
if w.closeIntercept != nil {
w.closeIntercept()
w.mu.Lock()
if w.closed {
w.mu.Unlock()
return
}
w.closed = true
intercept := w.closeIntercept
w.closeIntercept = nil
w.mu.Unlock()

if intercept != nil {
intercept()
}

if w.app != nil {
w.app.windowClosed(w)

Choose a reason for hiding this comment

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

P1 Badge Honor close intercept before removing window

The stub window now unconditionally marks itself closed and informs the app before invoking the closeIntercept callback. In real Fyne, a close intercept is meant to veto the close until it explicitly calls Close itself. By setting w.closed = true and notifying the app immediately, Run() will unblock even when the intercept decides not to close (e.g. it shows a confirmation dialog and returns). This makes the stub exit early in scenarios where the real GUI would keep running.

Useful? React with 👍 / 👎.

@VectoDE VectoDE deleted the codex/fix-high-priority-bug-in-fyne-stub branch October 21, 2025 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant