[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 7/8] sdl2: Do not leave grab when fullscreen
From: |
Jindrich Makovicka |
Subject: |
[Qemu-devel] [PATCH 7/8] sdl2: Do not leave grab when fullscreen |
Date: |
Sun, 12 Nov 2017 11:42:45 +0100 |
Prevents displaying of a doubled mouse pointer when moving the pointer
to the screen edges when fullscreen.
---
ui/sdl2.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ui/sdl2.c b/ui/sdl2.c
index cdc599be48..6feb637739 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -451,8 +451,9 @@ static void handle_mousemotion(SDL_Event *ev)
SDL_GetWindowSize(scon->real_window, &scr_w, &scr_h);
max_x = scr_w - 1;
max_y = scr_h - 1;
- if (gui_grab && (ev->motion.x == 0 || ev->motion.y == 0 ||
- ev->motion.x == max_x || ev->motion.y == max_y)) {
+ if (gui_grab && !gui_fullscreen
+ && (ev->motion.x == 0 || ev->motion.y == 0 ||
+ ev->motion.x == max_x || ev->motion.y == max_y)) {
sdl_grab_end(scon);
}
if (!gui_grab &&
--
2.15.0
- [Qemu-devel] [PATCH] SDL2 various fixes, Jindrich Makovicka, 2017/11/12
- [Qemu-devel] [PATCH 2/8] sdl2: Do not quit the emulator when an auxilliary window is closed, Jindrich Makovicka, 2017/11/12
- [Qemu-devel] [PATCH 3/8] sdl2: Use the same pointer show/hide logic for absolute and relative mode, Jindrich Makovicka, 2017/11/12
- [Qemu-devel] [PATCH 4/8] sdl2: Do not hide the cursor on auxilliary windows, Jindrich Makovicka, 2017/11/12
- [Qemu-devel] [PATCH 6/8] sdl2: Fix dead keyboard after fullsceen, Jindrich Makovicka, 2017/11/12
- [Qemu-devel] [PATCH 5/8] sdl2 uses surface relative coordinates, Jindrich Makovicka, 2017/11/12
- [Qemu-devel] [PATCH 1/8] sdl2: Fix broken display updating after the window is hidden, Jindrich Makovicka, 2017/11/12
- [Qemu-devel] [PATCH 7/8] sdl2: Do not leave grab when fullscreen,
Jindrich Makovicka <=
- [Qemu-devel] [PATCH 8/8] sdl2: Ignore UI hotkeys after a focus change when GUI modifier is held, Jindrich Makovicka, 2017/11/12
- Re: [Qemu-devel] [PATCH] SDL2 various fixes, Philippe Mathieu-Daudé, 2017/11/12
- [Qemu-devel] [PATCH 1/8] sdl2: Fix broken display updating after the window is hidden, Jindrich Makovicka, 2017/11/12
- Re: [Qemu-devel] [PATCH 1/8] sdl2: Fix broken display updating after the window is hidden, Gerd Hoffmann, 2017/11/13