Statistics
| Branch: | Revision:

root / ui / sdl.c @ 957f1f99

History | View | Annotate | Download (29.9 kB)

# Date Author Comment
7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

9510a486 08/05/2011 06:57 pm Jan Kiszka

sdl: Refactor sdl_send_mouse_event

Replace width/height globals with the identical values from real_screen,
refactor the function according to our coding style.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

2a8ad7da 08/05/2011 06:57 pm Jan Kiszka

sdl: Fix full screen toggling from scaled mode

When switching to full screen mode from a scaled window, we need to
resize to DisplayState's dimension, not the scaled "real" screen size.
Moreover, scaling mode may have manipulated the bpp. So we need to
restore it from the DisplayState as well....

f9977897 08/05/2011 06:57 pm Jan Kiszka

sdl: Restore scaling mode on return from full screen

Save the scaling mode and its geometry when going full screen, restore
it when returning to windowed mode.

CC: Stefano Stabellini <>
Signed-off-by: Jan Kiszka <>...

982aae66 08/05/2011 06:57 pm Jan Kiszka

sdl: Drop bogus gui_fullscreen_initial_grab

There must be no difference between initial -full-screen and switching
to this mode via the hot key.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

110defd7 08/05/2011 06:57 pm Jan Kiszka

sdl: Initialize gui_fullscreen earlier during setup

This ensures that we actually enter full screen on startup when e.g.
'-vga none -full-screen' was specified.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

f8558100 08/05/2011 06:57 pm Jan Kiszka

sdl: Consistently avoid grabbing input for text consoles

There were some preexisting bits that released the input when switching
to text console. This patch spreads this logic consistently and also
avoids grabbing the input while a text console is active....

f623d885 08/05/2011 06:57 pm Jan Kiszka

sdl: Never release input while in full screen mode

It's confusing to suddenly find two mice in full screen mode when
switching consoles or accidentally hitting the grab hot keys.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

74d9dc69 08/05/2011 06:57 pm Jan Kiszka

sdl: Fix cursor handling when switching consoles in absolute mouse mode

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 <>...

35b0f237 08/05/2011 06:57 pm Jan Kiszka

sdl: Dynamically grab input in absolute mouse mode

Not grabbing the input means that special keys like ALT+TAB are still
handled by the host. Improve the usability by grabbing input once the
mouse is inside the guest screen, provided the SDL window has the input...

d6a65ba3 08/05/2011 06:57 pm Jan Kiszka

sdl: Add zoom hot keys

Allow to enlarge or shrink the screen via CTRL-ALT-+/-. In contrast to
scaling the window, these controls always preserve the aspect ratio of
the current console.

CC: Stefano Stabellini <>
Signed-off-by: Jan Kiszka <>...

1ae1caf1 08/05/2011 06:57 pm Jan Kiszka

sdl: Factor out event handlers from sdl_refresh

No functional changes.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

941f511a 08/05/2011 06:57 pm Jan Kiszka

sdl: Fix termination in -no-shutdown mode

Just like the monitor does, we need to clear no_shutdown before calling
qemu_system_shutdown_request on quit requests. Otherwise, QEMU just
stops the VM.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

91ada980 08/05/2011 06:57 pm Jan Kiszka

sdl: Do not make full screen mode resizable

This prevents continuous resizing events and improper screen setups when
going full screen.

CC: Stefano Stabellini <>
Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

97ad1c26 08/05/2011 06:57 pm Jan Kiszka

sdl: Avoid redundant scaling deactivation

Prevents screen flickering.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

d71680c8 08/05/2011 06:57 pm Jan Kiszka

sdl: Properly mark modifier+u as hotkey

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

9e8dd451 07/23/2011 07:26 pm Jan Kiszka

notifier: Pass data argument to callback

This allows to pass additional information to the notifier callback
which is useful if sender and receiver do not share any other distinct
data structure.

Will be used first for the clock reset notifier.

Signed-off-by: Jan Kiszka <>...

9bf0960a 06/08/2011 11:04 am Alexandre Raymond

Fix compilation warning due to missing header for sigaction (followup)

This patch removes all references to signal.h when qemu-common.h is included
as they become redundant.

Signed-off-by: Alexandre Raymond <>
Signed-off-by: Stefan Hajnoczi <>

1de9756b 05/15/2011 02:05 am Michael Tokarev

set $SDL_VIDEODRIVER=x11 on Linux to prevent sudo kvm from fighting for video card

Signed-off-by: Michael Tokarev <>
Acked-by: Alexander Graf <>
Signed-off-by: Aurelien Jarno <>

09cec717 04/01/2011 10:53 pm Stefan Weil

ui/sdl: Load optional QEMU icon

Load an optional QEMU icon file. If there is no icon file named
qemu.bmp in QEMU's default search path, QEMU will run with
the usual system default icon.

A matching icon file will be loaded and used by X Windows managers...

ffe8b821 03/22/2011 03:39 pm Jes Sorensen

Consolidate DisplaySurface allocation in qemu_alloc_display()

This removes various code duplication from console.e and sdl.c

Signed-off-by: Jes Sorensen <>
Signed-off-by: Anthony Liguori <>

4e79bcbb 02/04/2011 02:33 pm Stefan Weil

ui/sdl: Fix handling of caps lock and num lock keys

Starting with SDL version 1.2.14, caps lock and num lock keys
will send a SDL_KEYUP when SDL_DISABLE_LOCK_KEYS=1 is set in
the environment.

The new code sets the environment unconditionally
(it won't harm old versions which do not know it)....

1b958498 01/30/2011 12:52 am Blue Swirl

sdl: remove unused variable

Variable rec is not used, remove it. Spotted by GCC 4.6.0:
CC ui/sdl.o
/src/qemu/ui/sdl.c: In function 'sdl_setdata':
/src/qemu/ui/sdl.c:90:14: error: variable 'rec' set but not used [-Werror=unused-but-set-variable]

Signed-off-by: Blue Swirl <>

cdfb017e 08/15/2010 12:46 pm Stefan Weil

win32: Avoid compiler warning (WIN32_LEAN_AND_MEAN redefined)

configure adds the macro WIN32_LEAN_AND_MEAN to
QEMU_CFLAGS, and SDL_syswm.h defines it, too.

This results in a compiler warning (redefinition of
WIN32_LEAN_AND_MEAN in SDL_syswm.h. That warning prevents...

3e230dd2 07/27/2010 01:35 am Corentin Chary

ui: move all ui components in ui/

Move sdl, vnc, curses and cocoa UI into ui/ to cleanup
the root directory. Also remove some unnecessary explicit
targets from Makefile.

aliguori: fix build when srcdir != objdir

Signed-off-by: Corentin Chary <>...