Skip to content

topbar: hide the bar for caption-style fullscreen games a pixel past the monitor - #193

Open
2sulraw wants to merge 1 commit into
Lemxy:mainfrom
2sulraw:fix/topbar-fullscreen-caption-game
Open

2sulraw wants to merge 1 commit into
Lemxy:mainfrom
2sulraw:fix/topbar-fullscreen-caption-game

Conversation

@2sulraw

@2sulraw 2sulraw commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

The bar stays on top of a fullscreen game.

Reported with: Minecraft, window class SDL_app, style 0x96CF0000 (WS_CAPTION set), IsZoomed false, rect 0,0 - 1921,1080 on a 0,0 - 1920,1080 monitor.

Cause: covers_monitor treats any window with a caption style as a framed window and required its rect to exactly equal the monitor. SDL sizes the game one pixel past the monitor (1921 vs 1920), so the equality check fails and the game is never seen as fullscreen.

Fix: only a framed maximized window (caption && zoomed) is excluded — that is the #88 case, which overhangs the monitor by its border. Any other window that covers the monitor is fullscreen, including a borderless game that keeps its caption style. This keeps #88 (a maximized editor/browser still shows the bar) while counting Minecraft, Dota 2 and friends.

Added the Minecraft rect to borderless_games_count_as_fullscreen; cargo test -p topbar passes (19 tests).

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