Commit Graph

8 Commits

Author SHA1 Message Date
Gerd Hoffmann
f2335791fd sdl2: textinput + terminal
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-06-02 16:28:58 +02:00
Gerd Hoffmann
363f59d9e4 sdl2: make Ctrl-Alt-<nr> hotkeys show and hide windows
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-06-02 16:28:58 +02:00
Gerd Hoffmann
ee8c0b622c sdl: pass key event source to input layer
So the input layer knows where the input is coming from
and input routing works correctly.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-05-26 08:42:43 +02:00
Cole Robinson
3f2fde2a00 sdl2: Support mouse wheel
In SDL2, wheel movement is its own event, not a button event. Wire
it up similar to gtk.c

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-29 10:46:33 +02:00
Dave Airlie
8b15d9f1d2 sdl2: add ui info setting.
Allows you to resize the sdl2 window and have the guest notice.

[ kraxel: zero-initialize QemuUIInfo ]

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-29 10:46:33 +02:00
Cole Robinson
2d968ffbae input: sdl2: Fix relative mode to match SDL1 behavior
Right now relative mode accelerates too fast, and has the 'invisible wall'
problem. SDL2 added an explicit API to handle this use case, so let's use
it.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-11 12:19:16 +02:00
Cole Robinson
afbc0dd649 input: sdl2: Fix guest_cursor logic
Unbreaks relative mouse mode with sdl2, just like was done with sdl.c
in c3aa84b6.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-11 12:19:16 +02:00
Dave Airlie
47c03744b3 ui/sdl2 : initial port to SDL 2.0 (v2.0)
I've ported the SDL1.2 code over, and rewritten it to use the SDL2 interface.

The biggest changes were in the input handling, where SDL2 has done a major
overhaul, and I've had to include a generated translation file to get from
SDL2 codes back to qemu compatible ones. I'm still not sure how the keyboard
layout code works in qemu, so there may be further work if someone can point
me a test case that works with SDL1.2 and doesn't with SDL2.

Some SDL env vars we used to set are no longer used by SDL2,
Windows, OSX support is untested,

I don't think we can link to SDL1.2 and SDL2 at the same time, so I felt
using --with-sdlabi=2.0 to select the new code should be fine, like how
gtk does it.

v1.1: fix keys in text console
v1.2: fix shutdown, cleanups a bit of code, support ARGB cursor

v2.0: merge the SDL multihead patch into this, g_new the number of consoles
needed, wrap DCL inside per-console structure.

Signed-off-by: Dave Airlie <airlied@redhat.com>

Fixes & improvements by kraxel:
 * baum build fix
 * remove text console logic
 * adapt to new input core
 * codestyle fixups

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05 09:52:05 +01:00