Follow-up to #9, which left the menu bar showing and squeezed the movie. Seen on flashbox with Bloons: the menu bar was visible at the top, the game didn't fit vertically, and there were black bars at the sides.
Cause
The window manager keeps windows on screen and no taller than the display. Flash Player's window opens at the movie plus the menu bar, which is taller than the display, so it was shrunk before fp-launch read its size:
the menu bar measured as 0, so nothing moved;
the movie was scaled into the display height minus the menu bar, which caused the side bars.
Changes
Measuring the menu bar. Its height is read from its own X window: GTK gives the menu bar a child window at the top left of the projector's window, and xwininfo (newly added x11-utils) lists it. This doesn't depend on the window's size.
Bypassing the window manager. The window is unmapped, made override-redirect and mapped again, so the window manager no longer constrains it. It's then resized to the display plus the menu bar, moved up by the menu bar's height, and given keyboard focus directly, since no window manager will do that for it.
Logging./config/fp-launch.log records the measured height and the window's child windows, so another miss can be diagnosed from one log.
Testing
fp-launch passes bash -n. This depends on X and GTK behavior I can't run here, so it needs checking on flashbox with Bloons:
No menu bar shows.
The game fills the stream.
Darts fly.
The keyboard still works in a game that uses it.
If anything's off, the log lines starting Flash Player window will show what was measured.
**Summary generated by LLM agent**
Follow-up to #9, which left the menu bar showing and squeezed the movie. Seen on flashbox with Bloons: the menu bar was visible at the top, the game didn't fit vertically, and there were black bars at the sides.
## Cause
The window manager keeps windows on screen and no taller than the display. Flash Player's window opens at the movie plus the menu bar, which is taller than the display, so it was shrunk before `fp-launch` read its size:
- the menu bar measured as 0, so nothing moved;
- the movie was scaled into the display height minus the menu bar, which caused the side bars.
## Changes
- **Measuring the menu bar.** Its height is read from its own X window: GTK gives the menu bar a child window at the top left of the projector's window, and `xwininfo` (newly added `x11-utils`) lists it. This doesn't depend on the window's size.
- **Bypassing the window manager.** The window is unmapped, made override-redirect and mapped again, so the window manager no longer constrains it. It's then resized to the display plus the menu bar, moved up by the menu bar's height, and given keyboard focus directly, since no window manager will do that for it.
- **Logging.** `/config/fp-launch.log` records the measured height and the window's child windows, so another miss can be diagnosed from one log.
## Testing
`fp-launch` passes `bash -n`. This depends on X and GTK behavior I can't run here, so it needs checking on flashbox with Bloons:
1. No menu bar shows.
2. The game fills the stream.
3. Darts fly.
4. The keyboard still works in a game that uses it.
If anything's off, the log lines starting `Flash Player window` will show what was measured.
The window manager kept the projector's window on screen and no taller
than the display, so its opening size didn't include the menu bar, the
menu bar was measured as zero and stayed visible, and the movie was
squeezed into what was left. The menu bar's height is now read from its
own X window, with xwininfo, and the window is made override-redirect
before it's moved and resized, then given focus directly. The measured
height and the window's children are logged.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary generated by LLM agent
Follow-up to #9, which left the menu bar showing and squeezed the movie. Seen on flashbox with Bloons: the menu bar was visible at the top, the game didn't fit vertically, and there were black bars at the sides.
Cause
The window manager keeps windows on screen and no taller than the display. Flash Player's window opens at the movie plus the menu bar, which is taller than the display, so it was shrunk before
fp-launchread its size:Changes
xwininfo(newly addedx11-utils) lists it. This doesn't depend on the window's size./config/fp-launch.logrecords the measured height and the window's child windows, so another miss can be diagnosed from one log.Testing
fp-launchpassesbash -n. This depends on X and GTK behavior I can't run here, so it needs checking on flashbox with Bloons:If anything's off, the log lines starting
Flash Player windowwill show what was measured.Pull request closed