[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/15] sdl: Fix cursor handling when switching conso
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH 11/15] sdl: Fix cursor handling when switching consoles in absolute mouse mode |
Date: |
Sat, 30 Jul 2011 11:39:14 +0200 |
From: Jan Kiszka <address@hidden>
Restore the cursor when switching from graphic to text console while the
mouse is in absolute mode. Disable it again when returning.
Signed-off-by: Jan Kiszka <address@hidden>
---
ui/sdl.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/ui/sdl.c b/ui/sdl.c
index 662ffef..5ad38d5 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -452,7 +452,7 @@ static void sdl_show_cursor(void)
if (!cursor_hide)
return;
- if (!kbd_mouse_is_absolute()) {
+ if (!kbd_mouse_is_absolute() || !is_graphic_console()) {
SDL_ShowCursor(1);
if (guest_cursor &&
(gui_grab || kbd_mouse_is_absolute() || absolute_enabled))
@@ -625,13 +625,20 @@ static void sdl_refresh(DisplayState *ds)
/* Reset the modifiers sent to the current console */
reset_keys();
console_select(keycode - 0x02);
+ gui_keysym = 1;
+ if (gui_fullscreen) {
+ break;
+ }
if (!is_graphic_console()) {
/* release grab if going to a text console */
- if (gui_grab && !gui_fullscreen) {
+ if (gui_grab) {
sdl_grab_end();
+ } else if (absolute_enabled) {
+ sdl_show_cursor();
}
+ } else if (absolute_enabled) {
+ sdl_hide_cursor();
}
- gui_keysym = 1;
break;
default:
break;
--
1.7.3.4
- [Qemu-devel] [PATCH 06/15] sdl: Restore scaling mode on return from full screen, (continued)
- [Qemu-devel] [PATCH 06/15] sdl: Restore scaling mode on return from full screen, Jan Kiszka, 2011/07/30
- [Qemu-devel] [PATCH 09/15] sdl: Consistently avoid grabbing input for text consoles, Jan Kiszka, 2011/07/30
- [Qemu-devel] [PATCH 13/15] sdl: Add zoom hot keys, Jan Kiszka, 2011/07/30
- [Qemu-devel] [PATCH 15/15] sdl: Refactor sdl_send_mouse_event, Jan Kiszka, 2011/07/30
- [Qemu-devel] [PATCH 14/15] sdl: Factor out event handlers from sdl_refresh, Jan Kiszka, 2011/07/30
- [Qemu-devel] [PATCH 05/15] sdl: Fix full screen toggling from scaled mode, Jan Kiszka, 2011/07/30
- [Qemu-devel] [PATCH 01/15] sdl: Fix termination in -no-shutdown mode, Jan Kiszka, 2011/07/30
- [Qemu-devel] [PATCH 08/15] sdl: Initialize gui_fullscreen earlier during setup, Jan Kiszka, 2011/07/30
- [Qemu-devel] [PATCH 03/15] sdl: Avoid redundant scaling deactivation, Jan Kiszka, 2011/07/30
- [Qemu-devel] [PATCH 11/15] sdl: Fix cursor handling when switching consoles in absolute mouse mode,
Jan Kiszka <=
- [Qemu-devel] [PATCH 12/15] sdl: Dynamically grab input in absolute mouse mode, Jan Kiszka, 2011/07/30
- [Qemu-devel] [PATCH 02/15] sdl: Do not make full screen mode resizable, Jan Kiszka, 2011/07/30
- Re: [Qemu-devel] [PATCH 00/15] sdl: Usability improvements, Anthony Liguori, 2011/07/31