Replaces #10. With #9 on flashbox, Flash Player's menu bar still shows, the game is cut off at the bottom, and darts now fly. #10's fix never ran: its menu-bar lookup found nothing, and under fp-launch's set -e and pipefail that silently ended the block that moves the window.
What the window looks like
Read with xwininfo on flashbox, with Bloons streaming at 640x480:
Window 0x1000003 "Adobe Flash Player 32,0,0,465": 640x536, parent: the window manager's frame
0x100001e: 640x480+0+56 <- the movie
0x1000004: 1x1+-1+-1
The menu bar isn't its own window. GTK draws it in the main window, so #10's lookup for a menu bar child found nothing. The movie is the largest child window, and its offset (56px) is the menu bar's height.
The window manager refused the move above the screen. The window wasn't resized (it's 536 tall, 480 plus 56). But the window manager's frame wouldn't move above the screen, so under #9 the menu bar stayed at the top and the bottom 56px of the game fell off the display.
Changes
Measuring. The menu bar's height is the vertical offset of the window's largest child window. On the output above it gives 56 under both mawk and gawk.
Bypassing the window manager. As in #10, the window is made override-redirect (unmap, set, map), resized to the display plus the menu bar, moved up by the menu bar's height, and given keyboard focus directly.
Keeping it there. Testing on flashbox showed the window at 0,-56 right after the move, then back at 0,0 once the game had loaded: Flash Player repositions its own window. So after placing it, the streamer checks the window's geometry twice a second for as long as the window exists, puts it back when it differs, and logs the first three corrections.
No silent exits. The block turns off errexit and pipefail, and logs the measured height, the display size and the window's final geometry to /config/fp-launch.log.
Image and env.x11-utils is added for xwininfo, as in #10. GAME_WIDTH/GAME_HEIGHT, which only fed the old measurement, are dropped, while the session manager still rounds just the display to even sizes.
Testing
Session manager tests pass (21), and fp-launch passes bash -n.
The measurement was checked against flashbox's real xwininfo output.
The placement loop was simulated with fake xdotool/xwininfo under set -euo pipefail. It restored the window after a simulated move back to 0,0, logged it once, and ended when the window closed.
Moving the window needs a real stream. With Bloons on flashbox, check:
no menu bar;
the full game height is visible;
darts still fly;
the log shows Flash Player window …: menu bar 56px, and then probably one moved to 0,0 …; putting it back once the game loads.
**Summary generated by LLM agent**
Replaces #10. With #9 on flashbox, Flash Player's menu bar still shows, the game is cut off at the bottom, and darts now fly. #10's fix never ran: its menu-bar lookup found nothing, and under `fp-launch`'s `set -e` and `pipefail` that silently ended the block that moves the window.
## What the window looks like
Read with `xwininfo` on flashbox, with Bloons streaming at 640x480:
```
Window 0x1000003 "Adobe Flash Player 32,0,0,465": 640x536, parent: the window manager's frame
0x100001e: 640x480+0+56 <- the movie
0x1000004: 1x1+-1+-1
```
- **The menu bar isn't its own window.** GTK draws it in the main window, so #10's lookup for a menu bar child found nothing. The movie is the largest child window, and its offset (56px) is the menu bar's height.
- **The window manager refused the move above the screen.** The window wasn't resized (it's 536 tall, 480 plus 56). But the window manager's frame wouldn't move above the screen, so under #9 the menu bar stayed at the top and the bottom 56px of the game fell off the display.
## Changes
- **Measuring.** The menu bar's height is the vertical offset of the window's largest child window. On the output above it gives 56 under both mawk and gawk.
- **Bypassing the window manager.** As in #10, the window is made override-redirect (unmap, set, map), resized to the display plus the menu bar, moved up by the menu bar's height, and given keyboard focus directly.
- **Keeping it there.** Testing on flashbox showed the window at `0,-56` right after the move, then back at `0,0` once the game had loaded: Flash Player repositions its own window. So after placing it, the streamer checks the window's geometry twice a second for as long as the window exists, puts it back when it differs, and logs the first three corrections.
- **No silent exits.** The block turns off `errexit` and `pipefail`, and logs the measured height, the display size and the window's final geometry to `/config/fp-launch.log`.
- **Image and env.** `x11-utils` is added for `xwininfo`, as in #10. `GAME_WIDTH`/`GAME_HEIGHT`, which only fed the old measurement, are dropped, while the session manager still rounds just the display to even sizes.
## Testing
- Session manager tests pass (21), and `fp-launch` passes `bash -n`.
- The measurement was checked against flashbox's real `xwininfo` output.
- The placement loop was simulated with fake `xdotool`/`xwininfo` under `set -euo pipefail`. It restored the window after a simulated move back to `0,0`, logged it once, and ended when the window closed.
- Moving the window needs a real stream. With Bloons on flashbox, check:
1. no menu bar;
2. the full game height is visible;
3. darts still fly;
4. the log shows `Flash Player window …: menu bar 56px`, and then probably one `moved to 0,0 …; putting it back` once the game loads.
GTK draws the projector's menu bar in its window, not in a child window,
so the previous lookup found nothing and, under set -e and pipefail,
silently ended the block that moves the window. The movie is the
window's largest child, and its offset is the menu bar's height (56px
on flashbox). The block no longer stops on errors, logs what it measured
and where the window ended up, and GAME_WIDTH/GAME_HEIGHT, unused now,
are dropped.
Flash Player moves its window back to the top of the screen once the
movie has loaded, bringing the menu bar back. The streamer now checks
the window twice a second and puts it back, logging the first few
times.
branderson
approved these changes 2026-10-14 18:17:58 -07:00
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
Replaces #10. With #9 on flashbox, Flash Player's menu bar still shows, the game is cut off at the bottom, and darts now fly. #10's fix never ran: its menu-bar lookup found nothing, and under
fp-launch'sset -eandpipefailthat silently ended the block that moves the window.What the window looks like
Read with
xwininfoon flashbox, with Bloons streaming at 640x480:Changes
0,-56right after the move, then back at0,0once the game had loaded: Flash Player repositions its own window. So after placing it, the streamer checks the window's geometry twice a second for as long as the window exists, puts it back when it differs, and logs the first three corrections.errexitandpipefail, and logs the measured height, the display size and the window's final geometry to/config/fp-launch.log.x11-utilsis added forxwininfo, as in #10.GAME_WIDTH/GAME_HEIGHT, which only fed the old measurement, are dropped, while the session manager still rounds just the display to even sizes.Testing
fp-launchpassesbash -n.xwininfooutput.xdotool/xwininfounderset -euo pipefail. It restored the window after a simulated move back to0,0, logged it once, and ended when the window closed.Flash Player window …: menu bar 56px, and then probably onemoved to 0,0 …; putting it backonce the game loads.