Skip to content

Clean up Qt6 main-window-flicker workaround (Windows and Linux) - #2803

Merged
dcwhite merged 10 commits into
masterfrom
claude/scirun-issue-2549-0af78b
Dec 4, 2026
Merged

dcwhite merged 10 commits into
masterfrom
claude/scirun-issue-2549-0af78b

Conversation

@dcwhite

@dcwhite dcwhite commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Closes #2549.

What changed

  • GuiApplication.cc: the default QSurfaceFormat setup moves into setDefaultOpenGLFormat(), with a comment pointing to Qt6 Windows build: entire SCIRun app disappears momentarily when you add a saved snippet #2484.
  • SCIRunMainWindow.cc: the hidden dummy QOpenGLWidget moves into primeOpenGLSurface(), with a comment explaining that Qt6 recreates the top-level native window the first time a GL child appears.
  • Both now run only on Windows and Linux (Q_OS_WIN || Q_OS_LINUX). The PR first limited them to Windows, on the assumption that macOS and Linux never flickered. Manual testing showed Linux has the same full-window flash (Ubuntu 24.04, Wayland, Qt 6.4.2), so 1edc41a turns the workaround back on there. macOS is still excluded: it ran without the workaround before Refactor: modernize cmake, boost, qt, and others to the latest or near latest #2463, and the forced 3.3-compat default format doesn't match ViewScene's 2.1 Core request there. That hasn't been tested yet.
  • The dummy widget no longer goes into the central widget's layout. A hidden widget takes no layout space, and parenting it to the main window is enough for Qt to see the GL child.

Testing

Not built locally (there is no build tree in this checkout), so CI does the compile check.

🤖 Generated with Claude Code

Platform testing

  • Windows
  • macOS
  • Linux

Move the #2484 fix out of GuiApplication::run and the SCIRunMainWindow
constructor into named helpers (setDefaultOpenGLFormat,
primeOpenGLSurface) that say why they exist.

Both are now Windows-only: the flicker was only ever seen there, and
the forced 3.3 compatibility default format is a needless risk on
macOS/Linux, which ran fine before PR #2463.

The dummy widget no longer goes into the central widget's layout. A
hidden widget takes no layout space, and parenting it to the main
window is what matters to Qt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dcwhite dcwhite added the Bug label Oct 4, 2026
@dcwhite
dcwhite requested a review from jessdtate October 4, 2026 21:15
@dcwhite dcwhite self-assigned this Oct 4, 2026
@dcwhite dcwhite added this to the Refactor Build System milestone Oct 4, 2026
@dcwhite dcwhite added the full-matrix Force mac-gui and windows-gui-qt6 on this PR label Oct 9, 2026
@dcwhite dcwhite mentioned this pull request Nov 5, 2026
@dcwhite
dcwhite requested a review from basisunus November 10, 2026 08:21
@dcwhite
dcwhite marked this pull request as ready for review November 10, 2026 08:26
@dcwhite

dcwhite commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Marking this ready so review can run in parallel with manual testing. I'll do the manual GUI checks on Windows, macOS and Linux tomorrow, 2026-11-11, and post the results here. Please don't merge before then.

jessdtate
jessdtate previously approved these changes Nov 11, 2026

@jessdtate jessdtate 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.

tested on a local gui build on mac and works fine. It may need a windows test since it was a windows bug.

dcwhite and others added 3 commits November 11, 2026 08:01
The full-window flash when the first ViewScene GL widget appears (#2484)
also happens on Linux: Ubuntu 24.04, Wayland, Qt 6.4.2. With the
workaround limited to Q_OS_WIN, adding a ViewScene snippet flashed the
whole window. Gating on Q_OS_WIN || Q_OS_LINUX removes it.

macOS is still excluded and untested.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@dcwhite dcwhite changed the title Clean up Qt6 Windows main-window-flicker workaround Clean up Qt6 main-window-flicker workaround (Windows and Linux) Nov 12, 2026
@dcwhite
dcwhite requested a review from jessdtate November 12, 2026 23:58
@dcwhite

dcwhite commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

Linux needed the fix too.

@dcwhite
dcwhite enabled auto-merge December 4, 2026 20:39
@dcwhite
dcwhite merged commit c52c33a into master Dec 4, 2026
12 checks passed
@dcwhite
dcwhite deleted the claude/scirun-issue-2549-0af78b branch December 4, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug full-matrix Force mac-gui and windows-gui-qt6 on this PR Graphics Refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up Qt6 Windows main-window-flicker fix (#2484)

2 participants