[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/19] ui/sdl2: Grab Alt+F4 also under Windows
|
From: |
marcandre . lureau |
|
Subject: |
[PULL 11/19] ui/sdl2: Grab Alt+F4 also under Windows |
|
Date: |
Sun, 28 May 2023 17:20:08 +0400 |
From: Bernhard Beschow <shentey@gmail.com>
SDL doesn't grab Alt+F4 under Windows by default. Pressing Alt+F4 thus closes
the VM immediately without confirmation, possibly leading to data loss. Fix
this by always grabbing Alt+F4 on Windows hosts, too.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Volker RĂ¼melin <vr_qemu@t-online.de>
Message-Id: <20230417192139.43263-3-shentey@gmail.com>
---
ui/sdl2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 8af8b89f1d..00aadfae37 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -859,6 +859,7 @@ static void sdl2_display_init(DisplayState *ds,
DisplayOptions *o)
#ifdef SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED
SDL_SetHint(SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED, "0");
#endif
+ SDL_SetHint(SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4, "1");
memset(&info, 0, sizeof(info));
SDL_VERSION(&info.version);
--
2.40.1
- [PULL 01/19] ui/gtk: fix passing y0_top parameter to scanout, (continued)
- [PULL 01/19] ui/gtk: fix passing y0_top parameter to scanout, marcandre . lureau, 2023/05/28
- [PULL 03/19] ui/gtk-egl: fix scaling for cursor position in scanout mode, marcandre . lureau, 2023/05/28
- [PULL 02/19] ui/gtk: use widget size for cursor motion event, marcandre . lureau, 2023/05/28
- [PULL 04/19] ui/sdl2: fix surface_gl_update_texture: Assertion 'gls' failed, marcandre . lureau, 2023/05/28
- [PULL 05/19] ui/dbus: fix compilation when GBM && !OPENGL, marcandre . lureau, 2023/05/28
- [PULL 06/19] win32: wrap socket close() with an exception handler, marcandre . lureau, 2023/05/28
- [PULL 07/19] virtio-gpu: add a FIXME for virtio_gpu_load(), marcandre . lureau, 2023/05/28
- [PULL 08/19] gtk: add gl-area support on win32, marcandre . lureau, 2023/05/28
- [PULL 09/19] ui/dbus: add a FIXME about texture/dmabuf scanout handling, marcandre . lureau, 2023/05/28
- [PULL 10/19] ui/sdl2: Grab Alt+Tab also in fullscreen mode, marcandre . lureau, 2023/05/28
- [PULL 11/19] ui/sdl2: Grab Alt+F4 also under Windows,
marcandre . lureau <=
- [PULL 12/19] ui/sdl2: disable SDL_HINT_GRAB_KEYBOARD on Windows, marcandre . lureau, 2023/05/28
- [PULL 13/19] ui/cursor: make width/height unsigned 16-bit integer, marcandre . lureau, 2023/05/28
- [PULL 14/19] virtio-input: generalize virtio_input_key_config(), marcandre . lureau, 2023/05/28
- [PULL 15/19] ui: add the infrastructure to support MT events, marcandre . lureau, 2023/05/28
- [PULL 16/19] virtio-input: add a virtio-mulitouch device, marcandre . lureau, 2023/05/28
- [PULL 17/19] virtio-input-pci: add virtio-multitouch-pci, marcandre . lureau, 2023/05/28
- [PULL 18/19] ui: add helpers for virtio-multitouch events, marcandre . lureau, 2023/05/28
- [PULL 19/19] ui/gtk: enable backend to send multi-touch events, marcandre . lureau, 2023/05/28
- Re: [PULL 00/19] Ui patches, Michael Tokarev, 2023/05/28
- Re: [PULL 00/19] Ui patches, Richard Henderson, 2023/05/29