Commit 9467cd4602adfdacb457478d6aa074ea02652645
1 parent
a90b7318
-show-cursor switch to inhibit SDL hiding cursor.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2763 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
13 additions
and
0 deletions
sdl.c
@@ -236,6 +236,9 @@ static void sdl_update_caption(void) | @@ -236,6 +236,9 @@ static void sdl_update_caption(void) | ||
236 | 236 | ||
237 | static void sdl_hide_cursor(void) | 237 | static void sdl_hide_cursor(void) |
238 | { | 238 | { |
239 | + if (!cursor_hide) | ||
240 | + return; | ||
241 | + | ||
239 | if (kbd_mouse_is_absolute()) { | 242 | if (kbd_mouse_is_absolute()) { |
240 | SDL_ShowCursor(1); | 243 | SDL_ShowCursor(1); |
241 | SDL_SetCursor(sdl_cursor_hidden); | 244 | SDL_SetCursor(sdl_cursor_hidden); |
@@ -246,6 +249,9 @@ static void sdl_hide_cursor(void) | @@ -246,6 +249,9 @@ static void sdl_hide_cursor(void) | ||
246 | 249 | ||
247 | static void sdl_show_cursor(void) | 250 | static void sdl_show_cursor(void) |
248 | { | 251 | { |
252 | + if (!cursor_hide) | ||
253 | + return; | ||
254 | + | ||
249 | if (!kbd_mouse_is_absolute()) { | 255 | if (!kbd_mouse_is_absolute()) { |
250 | SDL_ShowCursor(1); | 256 | SDL_ShowCursor(1); |
251 | if (guest_cursor && | 257 | if (guest_cursor && |
vl.c
@@ -189,6 +189,7 @@ const char *vnc_display; | @@ -189,6 +189,7 @@ const char *vnc_display; | ||
189 | int acpi_enabled = 1; | 189 | int acpi_enabled = 1; |
190 | int fd_bootchk = 1; | 190 | int fd_bootchk = 1; |
191 | int no_reboot = 0; | 191 | int no_reboot = 0; |
192 | +int cursor_hide = 1; | ||
192 | int graphic_rotate = 0; | 193 | int graphic_rotate = 0; |
193 | int daemonize = 0; | 194 | int daemonize = 0; |
194 | const char *option_rom[MAX_OPTION_ROMS]; | 195 | const char *option_rom[MAX_OPTION_ROMS]; |
@@ -6618,6 +6619,7 @@ enum { | @@ -6618,6 +6619,7 @@ enum { | ||
6618 | QEMU_OPTION_vnc, | 6619 | QEMU_OPTION_vnc, |
6619 | QEMU_OPTION_no_acpi, | 6620 | QEMU_OPTION_no_acpi, |
6620 | QEMU_OPTION_no_reboot, | 6621 | QEMU_OPTION_no_reboot, |
6622 | + QEMU_OPTION_show_cursor, | ||
6621 | QEMU_OPTION_daemonize, | 6623 | QEMU_OPTION_daemonize, |
6622 | QEMU_OPTION_option_rom, | 6624 | QEMU_OPTION_option_rom, |
6623 | QEMU_OPTION_semihosting, | 6625 | QEMU_OPTION_semihosting, |
@@ -6712,6 +6714,7 @@ const QEMUOption qemu_options[] = { | @@ -6712,6 +6714,7 @@ const QEMUOption qemu_options[] = { | ||
6712 | { "vmwarevga", 0, QEMU_OPTION_vmsvga }, | 6714 | { "vmwarevga", 0, QEMU_OPTION_vmsvga }, |
6713 | { "no-acpi", 0, QEMU_OPTION_no_acpi }, | 6715 | { "no-acpi", 0, QEMU_OPTION_no_acpi }, |
6714 | { "no-reboot", 0, QEMU_OPTION_no_reboot }, | 6716 | { "no-reboot", 0, QEMU_OPTION_no_reboot }, |
6717 | + { "show-cursor", 0, QEMU_OPTION_show_cursor }, | ||
6715 | { "daemonize", 0, QEMU_OPTION_daemonize }, | 6718 | { "daemonize", 0, QEMU_OPTION_daemonize }, |
6716 | { "option-rom", HAS_ARG, QEMU_OPTION_option_rom }, | 6719 | { "option-rom", HAS_ARG, QEMU_OPTION_option_rom }, |
6717 | #if defined(TARGET_ARM) | 6720 | #if defined(TARGET_ARM) |
@@ -7455,6 +7458,9 @@ int main(int argc, char **argv) | @@ -7455,6 +7458,9 @@ int main(int argc, char **argv) | ||
7455 | case QEMU_OPTION_no_reboot: | 7458 | case QEMU_OPTION_no_reboot: |
7456 | no_reboot = 1; | 7459 | no_reboot = 1; |
7457 | break; | 7460 | break; |
7461 | + case QEMU_OPTION_show_cursor: | ||
7462 | + cursor_hide = 0; | ||
7463 | + break; | ||
7458 | case QEMU_OPTION_daemonize: | 7464 | case QEMU_OPTION_daemonize: |
7459 | daemonize = 1; | 7465 | daemonize = 1; |
7460 | break; | 7466 | break; |
vl.h
@@ -158,6 +158,7 @@ extern int kqemu_allowed; | @@ -158,6 +158,7 @@ extern int kqemu_allowed; | ||
158 | extern int win2k_install_hack; | 158 | extern int win2k_install_hack; |
159 | extern int usb_enabled; | 159 | extern int usb_enabled; |
160 | extern int smp_cpus; | 160 | extern int smp_cpus; |
161 | +extern int cursor_hide; | ||
161 | extern int graphic_rotate; | 162 | extern int graphic_rotate; |
162 | extern int no_quit; | 163 | extern int no_quit; |
163 | extern int semihosting_enabled; | 164 | extern int semihosting_enabled; |