Skip to content

fix(visual): make sway respect window size and stop GNOME painting it blue#34

Merged
afonsojramos merged 2 commits into
mainfrom
sway-gnome-fixes
May 12, 2026
Merged

fix(visual): make sway respect window size and stop GNOME painting it blue#34
afonsojramos merged 2 commits into
mainfrom
sway-gnome-fixes

Conversation

@afonsojramos
Copy link
Copy Markdown
Member

Summary

Two cosmetic fixes for the residual platforms after the white-box marker landed:

Sway: window tiled to fill the workspace

Sway is a tiling compositor and ignores Electron's 200x100 size request, stretching the fixture to fill all available space. Added a for_window rule to the test's Sway config that matches by the HTML <title> ("menubar visual fixture") and forces the window floating + 200x100 + position (400, 200). Same dimensions and position as every other platform now.

GNOME: window paints navy-blue instead of white

Mutter was either painting a CSD header bar accent in our window region, or rendering it as "unfocused" with a dimming tint — either way our backgroundColor: '#FFFFFF' wasn't visible. Three changes to the fixture's browserWindow opts:

  • frame: false: no CSD header bar, no Mutter accent strip inside our 200x100 rect.
  • useContentSize: true: 200x100 is now the content size; without this, the inner HTML viewport was smaller than 200x100 because Electron sized the outer rect.
  • mb.window.focus() after setPosition: stops Mutter rendering the window with its "unfocused window" tint.

Test plan

  • Sway screenshot shows a 200x100 white box with the 80x40 black inner square (not a fullscreen white area)
  • GNOME screenshot shows white background + black square (not navy-blue rectangle)
  • Other platforms unchanged

@afonsojramos afonsojramos merged commit 03f4b78 into main May 12, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant