[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/8] sdl2: Use the same pointer show/hide logic for
From: |
Jindrich Makovicka |
Subject: |
[Qemu-devel] [PATCH 3/8] sdl2: Use the same pointer show/hide logic for absolute and relative mode |
Date: |
Sun, 12 Nov 2017 20:30:27 +0100 |
Also use a proper enum parameter for SDL_ShowCursor
Signed-off-by: Jindrich Makovicka <address@hidden>
---
ui/sdl2.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/ui/sdl2.c b/ui/sdl2.c
index dfbd0de791..9cf4b1772b 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -169,10 +169,10 @@ static void sdl_hide_cursor(void)
return;
}
- if (qemu_input_is_absolute()) {
- SDL_ShowCursor(1);
- SDL_SetCursor(sdl_cursor_hidden);
- } else {
+ SDL_ShowCursor(SDL_DISABLE);
+ SDL_SetCursor(sdl_cursor_hidden);
+
+ if (!qemu_input_is_absolute()) {
SDL_SetRelativeMouseMode(SDL_TRUE);
}
}
@@ -185,14 +185,16 @@ static void sdl_show_cursor(void)
if (!qemu_input_is_absolute()) {
SDL_SetRelativeMouseMode(SDL_FALSE);
- SDL_ShowCursor(1);
- if (guest_cursor &&
- (gui_grab || qemu_input_is_absolute() || absolute_enabled)) {
- SDL_SetCursor(guest_sprite);
- } else {
- SDL_SetCursor(sdl_cursor_normal);
- }
}
+
+ if (guest_cursor &&
+ (gui_grab || qemu_input_is_absolute() || absolute_enabled)) {
+ SDL_SetCursor(guest_sprite);
+ } else {
+ SDL_SetCursor(sdl_cursor_normal);
+ }
+
+ SDL_ShowCursor(SDL_ENABLE);
}
static void sdl_grab_start(struct sdl2_console *scon)
--
2.15.0
- Re: [Qemu-devel] [PATCH 5/8] sdl2 uses surface relative coordinates, (continued)
- Re: [Qemu-devel] [PATCH 5/8] sdl2 uses surface relative coordinates, Gerd Hoffmann, 2017/11/13
- [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
- Re: [Qemu-devel] [PATCH 1/8] sdl2: Fix broken display updating after the window is hidden, Gerd Hoffmann, 2017/11/13
- Re: [Qemu-devel] [PATCH 1/8] sdl2: Fix broken display updating after the window is hidden, Jindřich Makovička, 2017/11/13
- Re: [Qemu-devel] [PATCH 1/8] sdl2: Fix broken display updating after the window is hidden, Gerd Hoffmann, 2017/11/13
- Re: [Qemu-devel] [PATCH 1/8] sdl2: Fix broken display updating after the window is hidden, Max Reitz, 2017/11/13
- Re: [Qemu-devel] [PATCH 1/8] sdl2: Fix broken display updating after the window is hidden, Gerd Hoffmann, 2017/11/14
- Re: [Qemu-devel] [PATCH 1/8] sdl2: Fix broken display updating after the window is hidden, Max Reitz, 2017/11/14
- Re: [Qemu-devel] [PATCH 1/8] sdl2: Fix broken display updating after the window is hidden, Gerd Hoffmann, 2017/11/14
- [Qemu-devel] [PATCH 3/8] sdl2: Use the same pointer show/hide logic for absolute and relative mode,
Jindrich Makovicka <=
- [Qemu-devel] [PATCH 6/8] sdl2: Fix dead keyboard after fullsceen, Jindrich Makovicka, 2017/11/12
- [Qemu-devel] [PATCH 7/8] sdl2: Do not leave grab when fullscreen, Jindrich Makovicka, 2017/11/12
- [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 8/8] sdl2: Ignore UI hotkeys after a focus change when GUI modifier is held, Gerd Hoffmann, 2017/11/13
- Re: [Qemu-devel] [PATCH v3] SDL2 various fixes, Gerd Hoffmann, 2017/11/13
- Re: [Qemu-devel] [PATCH v3] SDL2 various fixes, Eric Blake, 2017/11/13