Skip to content

Fullscreen fixes, guest auto-resize, and --no-fullscreen-bar - #1

Open
Phaengris wants to merge 5 commits into
thelicato:mainfrom
Phaengris:fixes-and-fullscreen
Open

Fullscreen fixes, guest auto-resize, and --no-fullscreen-bar#1
Phaengris wants to merge 5 commits into
thelicato:mainfrom
Phaengris:fixes-and-fullscreen

Conversation

@Phaengris

Copy link
Copy Markdown

Hi! I've been daily-driving qd2 against a qemu 11.1 VM with the D-Bus display (virtio-gpu, GL enabled, 5120×1440 HiDPI host) — it's exactly the tool I was looking for. Four patches from that road test:

  • fix: fullscreen crashed the viewer (SIGSEGV). GTK4 forbids gtk_window_set_titlebar() on a realized window; the fullscreen toggle swapped the titlebar at runtime. Now the titlebar is set once and only its visibility is toggled — GTK hides titlebars in fullscreen anyway.
  • feat: guest auto-resize via SetUIInfo. The viewer now asks the guest to match its size on resize/maximize/fullscreen/first-map (debounced, HiDPI-aware) — the same mechanism the SPICE vdagent uses. This also fixes the letterboxing when starting with --fullscreen.
  • fix: "The guest display was disabled." never went away. The status label had no clearing path; the notice now clears on the next scanout/update from the guest.
  • feat: --no-fullscreen-bar. Opt out of the floating toolbar + top-edge hover hotspot in fullscreen — with guest desktops that have their own edge-activated panels, the hotspot fights the guest UI.

All 50 existing tests pass. Tested on Fedora 44, GTK4, against qemu 11.1 with -display dbus,gl=on (AMD; both native-context and virgl guests).

Happy to split this into separate PRs if you prefer smaller reviews — and thanks for building this; a standalone D-Bus display viewer was the missing piece of the ecosystem.

🤖 Generated with Claude Code

Phaengris and others added 4 commits August 14, 2026 18:55
GTK4 forbids gtk_window_set_titlebar() after the window has been
realized; toggling fullscreen swapped the titlebar at runtime, which
emitted Gtk-WARNINGs and crashed the viewer with SIGSEGV (both via the
F11 hotkey and --fullscreen at startup).

Set the titlebar once at construction and only toggle the header bar's
visibility when entering/leaving fullscreen - GTK hides titlebars in
fullscreen anyway, so the visible behavior is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Forward the viewer's size to the guest via the console's SetUIInfo
method - the same mechanism the SPICE vdagent uses - so the guest
display follows window resizes, maximization and fullscreen instead of
staying at its EDID-preferred mode and getting letterboxed.

Requests are debounced (350 ms) so interactive resizes send one final
size, are scale-factor aware for HiDPI hosts, and are also sent on the
first map so windows born fullscreen (--fullscreen) size the guest
correctly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The status label was shown but never hidden, so the transient disable
notice emitted during guest mode switches (or listener handover) stayed
on screen for the rest of the session.

Track the pending notice and clear it on the next scanout or dmabuf
update from the guest; an empty status message now hides the label.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Leave the floating fullscreen toolbar and its top-edge hover hotspot
unparented when requested. Useful when the guest desktop has its own
panels at the screen edges: the hover hotspot otherwise fights with
edge-activated guest UI (auto-hide panels, top-edge menus).

Fullscreen can still be toggled via the hotkey (F11 by default) and the
titlebar button in windowed mode.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…resize

The auto-resize triggers listened only to window property notifications
(default size, fullscreened, maximized) — but when the compositor resizes
the surface itself, none of those change. The common case: the monitor's
resolution changes while the viewer is fullscreen; the window keeps
covering the screen but the guest is never asked to adopt the new size
until the viewer is reopened.

Hook the GDK surface's layout signal (the ground truth for actual size
changes, connected on every realize) and the window's scale-factor
notify (a monitor with a different scale changes the physical pixel
count without a logical resize), both feeding the existing debounce.
@Phaengris

Copy link
Copy Markdown
Author

Pushed one additional commit to this branch: the auto-resize feature now also reacts to compositor-driven surface resizes (GDK surface layout signal + scale-factor changes) — previously a monitor resolution change under a fullscreen viewer never reached the guest. #2 has been rebased accordingly.

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