aboutsummaryrefslogtreecommitdiff
path: root/ui
AgeCommit message (Collapse)AuthorFilesLines
2014-03-09Add a 'name' parameter to qemu_thread_createDr. David Alan Gilbert1-1/+2
If enabled, set the thread name at creation (on GNU systems with pthread_set_np) Fix up all the callers with a thread name Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2014-03-05ui/sdl2 : initial port to SDL 2.0 (v2.0)Dave Airlie5-3/+1102
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-05console: add QemuUIInfoGerd Hoffmann1-0/+17
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05console: add head to index to qemu consoles.Gerd Hoffmann1-4/+24
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: remove index_from_keycode (no users)Gerd Hoffmann1-14/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: move do_mouse_set to new coreGerd Hoffmann2-43/+21
This removes the last user of the lecagy input mouse handler list, so we can remove more legacy bits with this. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: move qmp_query_mice to new coreGerd Hoffmann2-23/+29
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: add input_mouse_mode tracepointGerd Hoffmann1-0/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: move mouse mode notifier to new coreGerd Hoffmann2-33/+31
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input-legacy: remove kbd_mouse_eventGerd Hoffmann1-49/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input-legacy: remove kbd_mouse_is_absoluteGerd Hoffmann1-10/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input-legacy: remove kbd_mouse_has_absoluteGerd Hoffmann1-19/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input-legacy: remove kbd_put_keycodeGerd Hoffmann1-23/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: trace eventsGerd Hoffmann1-0/+48
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: mouse: switch cocoa ui to new coreGerd Hoffmann1-21/+42
Build fixes by Peter Maydell. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: keyboard: switch cocoa ui to new coreGerd Hoffmann1-12/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: mouse: switch spice ui to new coreGerd Hoffmann1-24/+38
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: mouse: switch vnc ui to new coreGerd Hoffmann2-24/+23
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: mouse: switch sdl ui to new coreGerd Hoffmann1-45/+39
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: mouse: switch gtk ui to new coreGerd Hoffmann1-39/+19
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: mouse: switch legacy handlers to new coreGerd Hoffmann1-0/+63
legacy mouse event handlers are registered in the new core, so they receive events submitted to the new input core. legacy kbd_mouse_event() continues to use the old code paths. So new-core event handlers wouldn't see events submitted via kbd_mouse_event. This leads to the constrain that we we must transition all kbd_mouse_event() users first to keep things working. But that is easier to handle than translating legacy mouse events into new-core mouse events ;) Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: mouse: add qemu_input_is_absolute()Gerd Hoffmann1-0/+8
Same as kbd_mouse_is_absolute(), but using new input core. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: mouse: add graphic_rotate supportGerd Hoffmann1-0/+31
Transform absolute mouse events according to graphic_rotate. Legacy input code does it for both absolute and relative events, but the logic is broken for relative coordinates, so this is most likely not used anyway. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: mouse: add helpers functions to coreGerd Hoffmann1-0/+71
Likewise a bunch of helper functions to manage mouse button and movement events, again to make life easier for the ui code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: keyboard: switch curses ui to new coreGerd Hoffmann1-22/+25
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: keyboard: switch spice ui to new coreGerd Hoffmann1-2/+20
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: keyboard: switch vnc ui to new coreGerd Hoffmann1-19/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: keyboard: switch sdl ui to new coreGerd Hoffmann1-18/+9
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: keyboard: switch gtk ui to new coreGerd Hoffmann1-15/+4
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: keyboard: switch qmp_send_key() to new core.Gerd Hoffmann1-8/+3
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: keyboard: switch legacy handlers to new coreGerd Hoffmann1-10/+56
legacy kbd event handlers are registered in the new core, so they receive events from the new input core code. keycode -> scancode translation needed here. legacy kbd_put_keycode() sends events to the new core. scancode -> keycode translation needed here. So with this patch the new input core is fully functional for keyboard events. New + legacy interfaces can be mixed in any way. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: keyboard: add helper functions to coreGerd Hoffmann1-0/+35
A bunch of helper functions to manage keyboard events, to make life simpler for the ui code when submitting keyboard events. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: add core bits of the new input layerGerd Hoffmann2-1/+84
Register and unregister handlers. Event dispatcher code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05input: rename file to legacyGerd Hoffmann2-1/+1
Rename ui/input.c to ui/input-legacy.c. We are going to replace it step by step. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-03-05console: export QemuConsole index,width,heightGerd Hoffmann1-0/+24
Add functions to query QemuConsole properties. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-01-20gtk: Support keyboard translation for hosts running WindowsStefan Weil1-3/+15
GTK uses different hardware keycodes on Windows hosts, so some special handling is needed to get the QEMU keycode. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2014-01-12ui/cocoa: Remove stray tabsPeter Maydell1-3/+3
The ui/cocoa.m file has just three lines with hardcoded tabs; fix them. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Message-id: 1387886052-27067-1-git-send-email-peter.maydell@linaro.org
2014-01-12ui/cocoa: Draw black rectangle if we have no data yetPeter Maydell1-1/+6
If our redraw method is called before we have any data from the guest, then draw a black rectangle rather than leaving the window empty. This mostly only matters when the guest machine has no framebuffer device, but it is more in line with the behaviour of other QEMU UIs. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1387853507-26298-3-git-send-email-peter.maydell@linaro.org
2014-01-12ui/cocoa: Redraw at correct size when switching surfacePeter Maydell1-7/+17
If the surface switch involved a resize, we were doing the redraw at the old size rather than the new, because the update of screen.width and screen.height was being done after the setFrame method calls which triggered a redraw. Normally this isn't very noticeable because typically after the guest triggers the window resize it also draws something to it, which will in turn cause us to redraw. However, the combination of a guest which never draws to the display and a command line setting of a screen size larger than the default can reveal odd effects. Move most of the handling of resizes to the top of the method, and guard it with a check that the surface size actually changed, to avoid unnecessary operations (including some user visible ones like "recenter the window on the screen") if the surface is the same size as the old one. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1387853507-26298-2-git-send-email-peter.maydell@linaro.org
2014-01-12ui/cocoa: Fix code for starting QEMU via image file load dialogPeter Maydell1-6/+6
Fix a number of bugs in the code for starting QEMU via the image file load dialog: * use the actual argv[0] rather than "qemu": this avoids failures to find BIOS image files caused by not looking in the correct directory relative to the executable path * allocate a large enough argv array to NULL terminate it * use g_strdup(X) rather than g_strdup_printf("%s", X) or g_strdup_printf(X) * disable the printing of the simulated command line argument (which is presumably intended for debug only) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1386543546-31919-6-git-send-email-peter.maydell@linaro.org
2014-01-12ui/cocoa: Add ".qcow2" to extension list for image load dialogPeter Maydell1-1/+1
Add ".qcow2" to the list of file extensions which are accepted by the initial disk image load dialog which is displayed if the user runs QEMU without any command line arguments. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1386543546-31919-5-git-send-email-peter.maydell@linaro.org
2014-01-12ui/cocoa: Send warning message to stderr, not stdoutPeter Maydell1-1/+1
Bring a warning message into line with the others in this file by sending it to stderr, not stdout. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1386543546-31919-4-git-send-email-peter.maydell@linaro.org
2014-01-12ui/cocoa: Correct typos in comments and variable namesPeter Maydell1-14/+14
Fix various non-user-visible typos in comments and variable names. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Message-id: 1386543546-31919-3-git-send-email-peter.maydell@linaro.org
2014-01-12ui/cocoa: Pass command key through to guest when VM has mousegrabPeter Maydell1-7/+18
The guest might want to be able to use the command key for its won purposes (as command if it is MacOS X, or for the Windows key if it is a PC guest, for instance). In line with other UI frontends, pass it through if the guest has mousegrab, and only use it for UI menu accelerators if not grabbed. Thanks to John Arbuckle for reporting this problem, helping us work through what the best solution would be and providing a patch which was the initial inspiration for this one. Reported-by: John Arbuckle <programmingkidx@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1386543546-31919-2-git-send-email-peter.maydell@linaro.org
2013-12-23ui/cocoa: Use macro ARRAY_SIZE where possibleStefan Weil1-3/+2
This improves readability and simplifies the code. Cc: Andreas Färber <andreas.faerber@web.de> Cc: Anthony Liguori <aliguori@amazon.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-12-16spice: move spice_server_vm_{start,stop} calls into qemu_spice_display_*()Gerd Hoffmann1-2/+2
So calling spice server to start/stop the worker goes hand in hand with the status variable update. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-16spice: move qemu_spice_display_*() from spice-graphics to spice-coreGerd Hoffmann2-17/+16
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-16spice: flip streaming video mode to off by defaultGerd Hoffmann1-0/+2
Video streaming detection heuristics in spice-server have problems keeping modern desktop animations (as done by gnome shell) and real video playback apart. This leads to jpeg compression artefacts on your desktop, due to spice using mjpeg to send what it thinks is a video stream. Turn off video detection by default to avoid these artifacts. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
2013-12-02Don't crash on keyboard input with no handlerDon Koch1-1/+1
Prevent a call to put_kbd if null. On shutdown of some OSes, the keyboard handler goes away before the system is down. If a key is typed during this window, qemu crashes. Signed-off-by: Don Koch <dkoch@verizon.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-12-02misc: Replace 'struct QEMUTimer' by 'QEMUTimer'Stefan Weil1-1/+1
Most code already used QEMUTimer without the redundant 'struct' keyword. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>