Skip to content

Fix popup movement tests on headless Qt backends - #1399

Open
Gberfield wants to merge 2 commits into
quickshell-mirror:masterfrom
Gberfield:fix/popup-headless-tests
Open

Gberfield wants to merge 2 commits into
quickshell-mirror:masterfrom
Gberfield:fix/popup-headless-tests

Conversation

@Gberfield

Copy link
Copy Markdown

The popup movement test was checking the popup’s position right after moving its parent, but Qt doesn’t actually reposition it until the next polish pass. So I changed those checks to wait for that, and left the expected coordinates as they were.
There’s also a quirk with Qt’s minimal backend: it updates window geometry but never sends a move notification. The test now sends that notification itself and then processes the popup’s pending polish. No production code was touched.
To validate, I ran all nine tests on both offscreen and minimal, and they pass. Formatting is clean too. Linting the full file gives 13 diagnostics, but the upstream baseline has the same 13, so this change doesn’t introduce any new ones.

The popup movement test was checking the popup’s position right after moving its parent, but Qt doesn’t actually reposition it until the next polish pass. So I changed those checks to wait for that, and left the expected coordinates as they were.
There’s also a quirk with Qt’s `minimal` backend: it updates window geometry but never sends a move notification. The test now sends that notification itself and then processes the popup’s pending polish. No production code was touched.
To validate, I ran all nine tests on both `offscreen` and `minimal`, and they pass. Formatting is clean too. Linting the full file gives 13 diagnostics, but the upstream baseline has the same 13, so this change doesn’t introduce any new ones.
@Gberfield

Copy link
Copy Markdown
Author
AI-generated CI validation evidence

Follow-up commit: 8a79e95.

The existing Archlinux job now enables BUILD_TESTING and runs only the existing popupwindow CTest suite under both offscreen and minimal, with software rendering. The full build and Nix Qt/compiler matrix are preserved; no production source changes were added.

Verified results:

  • Build workflow: all 35 jobs passed.
  • Archlinux test logs: Qt 6.12.0, BUILD_TESTING=ON, and TestPopupWindow::moveWithParent() passed under both backends. Each invocation reports 10 QtTest passes (including setup and cleanup), zero failures and zero skips.
  • Lint workflow: still pending completion when this summary was prepared.

Reproduction, with the dependencies listed in the Archlinux workflow installed:

cmake -GNinja -B build -DVENDOR_CPPTRACE=ON -DBUILD_TESTING=ON
cmake --build build
QT_QUICK_BACKEND=software QT_QPA_PLATFORM=offscreen ctest --test-dir build -R '^popupwindow$' --no-tests=error --timeout 60 --verbose
QT_QUICK_BACKEND=software QT_QPA_PLATFORM=minimal ctest --test-dir build -R '^popupwindow$' --no-tests=error --timeout 60 --verbose

The anchored filter and --no-tests=error prevent an empty test selection from passing silently. The timeout bounds a hung test, and verbose output exposes individual assertions.

This establishes compilation and automated headless regression execution, not graphical desktop/compositor behavior. The earlier local nine-target test results are separate evidence; this CI step executes only popupwindow on two backends. No new local C++ test run is claimed.

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.

1 participant