Skip to content

Re-add tint2 to the headful image - #522

Merged
chruffins merged 2 commits into
mainfrom
hypeship/readd-tint2
Nov 17, 2026
Merged

chruffins merged 2 commits into
mainfrom
hypeship/readd-tint2

Conversation

@chruffins

@chruffins chruffins commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Re-adds the tint2 package to the headful image for compatibility. The image doesn't start it, but workloads can start a tint2 panel through the process API.

A tint2 panel started with panel_dock = 1 goes into openbox's dock, and the default dock strut shrinks _NET_WORKAREA. A maximized browser then covers only part of the display. rc.xml now sets <dock><noStrut>yes</noStrut></dock> so docked apps don't reserve any of the work area.

Changes

  • images/chromium-headful/Dockerfile: install tint2 again, with a note on why it's kept.
  • images/chromium-headful/openbox/rc.xml: disable the dock strut.
  • server/e2e/e2e_tint2_dock_strut_test.go: start a docked tint2 through the process API, then assert that _NET_WORKAREA equals the root and the maximized window stays at root size. The test fails if the package is removed or the strut comes back.

Testing

Built the headful image locally with and without the rc.xml change:

  • Without it, the new test fails: _NET_WORKAREA is 0, 0, 1024, 1536 on a 2048x1536 root, and the maximized window is 1024 wide.
  • With it, TestHeadfulDockedTint2KeepsFullWorkarea, TestHeadfulUnmaximizeRestoreGeometry, and the headful TestDisplayResizeChromiumWindow subtests pass.

@chruffins
chruffins marked this pull request as ready for review November 17, 2026 18:15

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

Approving: putting the package back is the right call. Something outside the image runs tint2 through process exec, so dropping it was a breaking change.

Optional suggestions:

  • Leave a note on the line (inline suggestion below). #513 removed tint2 because nothing in the repo showed it was needed, and this PR deletes the only comment about it. A short note saying it's an external dependency, like the one on x11-utils just above, makes the next removal attempt visible in review.
  • PR description: "It's unused" is true for the image but not for sessions. Saying it's kept for workloads that start it through process exec would explain why it's here.

Follow-up, not for this PR:

  • openbox dock strut: openbox/rc.xml has no <dock> section, so a panel started with panel_dock = 1 gets the default dock strut. That strut shrinks _NET_WORKAREA, and the maximized browser ends up part-width (the issue #513 addressed). <dock><noStrut>yes</noStrut></dock> in rc.xml might fix it from the image side, but it needs checking against a repro first.
  • Regression test: an e2e test could start tint2 with panel_dock = 1 and assert that the _NET_WORKAREA width matches the root and the window stays maximized at root width. It would fail if the package is removed or if the strut issue comes back.

# no panel: a tint2 started inside a session declares a strut that can
# reserve part of the work area, leaving a maximized window short of the
# display with the root background showing beside it
tint2 \

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.

Optional: keep a note so the dependency is visible next time someone audits this list.

Suggested change
tint2 \
# not started by the image: kept for workloads that start a tint2 panel
# through the process API
tint2 \

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Applied.

@chruffins
chruffins merged commit 63a42eb into main Nov 17, 2026
10 checks passed
@chruffins
chruffins deleted the hypeship/readd-tint2 branch November 17, 2026 19:37
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