Repository navigation
Conversation
MainWindow's constructor called showMaximized() unconditionally, so command-line export and --test runs flashed a maximized main window and stole focus. Only show it in GUI mode. On macOS the bundle was also registered as a regular Dock app as soon as AppKit started, before the command line is parsed, so a Dock icon still appeared. Mark the bundle LSUIElement and promote it to a regular app (Dock icon, menu bar) in GUI mode only, before the event loop starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…reedom#1770 ImageTool asked with a QMessageBox when a pattern's background image was missing or unreadable, even in console mode (export / test), so a scripted export blocked until someone clicked. In console mode, log a warning and skip the image, as answering No does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Added 83fe007: missing background image no longer prompts in console mode.
Tested with
|
…shionFreedom#1770 Application2D::event() shows the main window on ApplicationActivate. When a console export ran while another Seamly2D instance from the same bundle was open, the export process got activated and its hidden, maximized main window appeared. Only show it in GUI mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Added 0fd487f: app activation no longer shows the window in console mode (macOS).
Tested by running
|
…nFreedom#1770 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hi @palepal — Thank you for the PR and for documenting your testing so thoroughly. We appreciate the care you've taken to validate the changes. We recognize that much of the PR checklist is geared toward GUI functionality and may not apply to headless operations, so we appreciate your judgment in identifying the relevant tests. The CLI has received relatively little attention recently, so it's great to see improvements in this area, particularly with testing on macOS. |
|
@palepal — We're updating our CI workflow to better support PRs from forks. The CodeSee failure is on our side; no action is needed from you. Thanks for your patience. |
…ionFreedom#1770 Qt's Cocoa plugin activates every app it starts, so each seamly2d -t or export run closed open menus and stole keyboard input. Disable that transform before the app is created and unset it again in GUI mode, which still comes to the front. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@csett86 ? |
Change and reason
Fixes #1770. Console mode (
-b/--basenameexport,--test) flashed a maximized main window, stole focus, and on macOS showed a Dock icon.mainwindow.cpp:showMaximized()in theMainWindowconstructor ran unconditionally. It is now guarded byApplication2D::isGUIMode(), like the existingwindow.show()inmain.cpp.QApplicationconstructor, before the command line is parsed, so changing activation policy afterwards still leaves a Dock icon for about a second (measured). Instead,Info.plistsetsLSUIElement, andmain.cppcalls newshowDockIcon()(core/macos_dock.mm,setActivationPolicy(Regular)) in GUI mode before the event loop starts. Console mode never gets a Dock icon.qt.qpa.application: Launched with <frontmost app> as frontmost application. Activating ... instead.), so each console run took focus, closed open menus and swallowed typing in the active app.main.cppsetsQT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORMbefore the app is created and unsets it in GUI mode. Qt reads it again when the event loop starts, so GUI launches still come to the front.Linux/Windows behaviour changes only through the
showMaximized()guard.Automated validation
Integration testing (before approval)
Tester/date: palepal, 2026-10-18
OS/version/architecture: macOS 26 (Darwin 25.6.0), arm64
Tested commit SHA / version: 6eaeb94, focus fix re-tested on 7f1f5f8 (local build with Homebrew Qt 6.12.0, arm64 only)
Sample files, steps, screenshots, and findings:
Copy of
src/app/share/samples/patterns/trousers.sm2d. The window list and Dock items were polled during each run (CoreGraphics window list, Dock accessibility items,lsappinfo).-b out -f 0(SVG) export--testopen(LaunchServices)Focus (7f1f5f8, 2026-10-19), with another app frontmost and
QT_LOGGING_RULES='qt.qpa.application*=true', copy ofjacket3_40-146.sm2d:--test, 3 + 20 runsActivating ... insteadlogged once per run, open menus in the active app closedlsappinfo frontduring 8 runs), exit 0-bexport,-f 0SVG,-f 1PDF,-f 2tiled PDF--test, 11 runs while a GUI instance has a pattern open behind another app--test, 5 runs while a GUI instance is frontmostopen -n -a Seamly2D.app(Dock/Finder path)open -n -a Seamly2D.app pattern.sm2d(Finder double-click path)SVG and PNG exports are byte-identical to the unpatched build. PDFs differ only in CreationDate/ModDate.
Result: NOT YET TESTED (full checklist)
Not-applicable steps and reasons: The change touches only startup window visibility and the macOS activation policy. Drafting, piece, and layout-editing paths are not modified, but the full checklist has not been run yet. Results will be added in a comment.
Unrelated, found while testing: with a fresh profile the Welcome dialog shows first and a file opened through LaunchServices is dropped (the main window opens untitled). Release 2026.10.12 does the same; with the Welcome dialog turned off the file opens. Not touched here.
Also unrelated: DXF export (
-f 14) segfaults in console mode, including on release 2026.9.21. Not touched here; I'll file it separately.🤖 Generated with Claude Code