On a Wayland desktop without zenity, KDE's by default, SDL's message box showed nothing and the close went ahead: the VM turned off with no question asked. The library now draws the question in the VM's own window on Linux, with nothing installed on the host and the same on every desktop: macOS's words and buttons in ASCII, in an 8 by 8 font scaled by a whole number of pixels from the window's density, Cancel the default for Return and Escape, Tab and the arrows moving the focus, and Space or a click answering a button. The display's sink draws it over the frame in a pass like the cursor's, over black where the display has nothing to draw. The font's glyphs are copied from SDL 3.4.18's src/render/SDL_render_debug_font.h, which marks them public domain; LICENSE says so. Where the window draws no more (its GPU lost, or no swapchain), SDL's message box asks instead. Where no question can show at all, the close no longer turns the VM off, on any OS: it keeps the VM running and logs why, and the VM is then turned off by the guest's own shutdown or the host's stop (reims-ctl stop). The one case known to reach it is a Linux host whose window draws no more, in a Wayland session without zenity or with no X server. Windows keeps its task dialog. The register's Leaving entry on Linux and Windows says what the code does now, with the tests of the pattern.
25 lines
1.3 KiB
Plaintext
25 lines
1.3 KiB
Plaintext
reims-vgpu is free software: you can redistribute it and/or modify it under
|
|
the terms of either of these licenses, at your option:
|
|
|
|
- the GNU General Public License, version 2, or (at your option) any later
|
|
version: LICENSES/GPL-2.0-or-later.txt;
|
|
- the GNU Lesser General Public License, version 3, or (at your option) any
|
|
later version: LICENSES/LGPL-3.0-or-later.txt. The LGPL's version 3 is a
|
|
set of permissions added to the GNU General Public License, version 3,
|
|
whose text is LICENSES/GPL-3.0-or-later.txt.
|
|
|
|
As an SPDX license expression: GPL-2.0-or-later OR LGPL-3.0-or-later.
|
|
|
|
It is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
A PARTICULAR PURPOSE. See the licenses for more details.
|
|
|
|
This covers everything in the repository but QEMU, the submodule at
|
|
vendor/qemu, which keeps QEMU's own licenses (its LICENSE and COPYING
|
|
files), and the 8 by 8 font's glyphs in
|
|
crates/reims-vgpu-window/src/native/sdl_thread/question.rs, copied from SDL
|
|
3.4.18's src/render/SDL_render_debug_font.h: Marcel Sondaar's font8_8, of
|
|
IBM's VGA font, which that file marks public domain. The crates the build takes, from crates.io and from the metal2vulkan
|
|
repository, are not part of the repository, and each keeps its
|
|
own license.
|