The app bar discarded the title bar's output, so a click on the
caption Close button was reported and never acted on: on a desktop
that shows the app's own frame (GNOME/Wayland), the button did
nothing. Send the viewport Close command when the bar reports it,
as the page band's Close does. The unsaved-changes prompt runs from
the close request the command raises, as an OS close does.