summaryrefslogtreecommitdiffstats
path: root/ui/sdl.c
Commit message (Collapse)AuthorAgeFilesLines
* Drop the vm_running global variableLuiz Capitulino2011-09-151-3/+3
| | | | | | Use runstate_is_running() instead, which is introduced by this commit. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* sdl: Don't release input on mouse mode change in full-screen modeJan Kiszka2011-08-221-1/+3
| | | | | | | | | While in full-screen mode, the input focus naturally belongs to the SDL window. Avoid dropping it when switching from absolute to relative mouse mode. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Use glib memory allocation and free functionsAnthony Liguori2011-08-201-10/+10
| | | | | | qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Refactor sdl_send_mouse_eventJan Kiszka2011-08-051-11/+11
| | | | | | | | Replace width/height globals with the identical values from real_screen, refactor the function according to our coding style. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Factor out event handlers from sdl_refreshJan Kiszka2011-08-051-205/+271
| | | | | | | No functional changes. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Add zoom hot keysJan Kiszka2011-08-051-0/+13
| | | | | | | | | | 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 <stefano.stabellini@eu.citrix.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Dynamically grab input in absolute mouse modeJan Kiszka2011-08-051-6/+37
| | | | | | | | | | | | 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 focus. Release it again when the mouse is moved to any border. Also grab the input when we gain the input focus and the mouse is within the screen limits. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Fix cursor handling when switching consoles in absolute mouse modeJan Kiszka2011-08-051-3/+10
| | | | | | | | 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 <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Never release input while in full screen modeJan Kiszka2011-08-051-3/+4
| | | | | | | | 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 <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Consistently avoid grabbing input for text consolesJan Kiszka2011-08-051-3/+6
| | | | | | | | | 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. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Initialize gui_fullscreen earlier during setupJan Kiszka2011-08-051-4/+5
| | | | | | | | This ensures that we actually enter full screen on startup when e.g. '-vga none -full-screen' was specified. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Drop bogus gui_fullscreen_initial_grabJan Kiszka2011-08-051-3/+1
| | | | | | | | There must be no difference between initial -full-screen and switching to this mode via the hot key. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Restore scaling mode on return from full screenJan Kiszka2011-08-051-15/+33
| | | | | | | | | Save the scaling mode and its geometry when going full screen, restore it when returning to windowed mode. CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Fix full screen toggling from scaled modeJan Kiszka2011-08-051-1/+2
| | | | | | | | | | | 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. CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Properly mark modifier+u as hotkeyJan Kiszka2011-08-051-0/+1
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Avoid redundant scaling deactivationJan Kiszka2011-08-051-4/+6
| | | | | | | Prevents screen flickering. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Do not make full screen mode resizableJan Kiszka2011-08-051-2/+5
| | | | | | | | | This prevents continuous resizing events and improper screen setups when going full screen. CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: Fix termination in -no-shutdown modeJan Kiszka2011-08-051-1/+3
| | | | | | | | | 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 <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* notifier: Pass data argument to callbackJan Kiszka2011-07-231-1/+1
| | | | | | | | | | | 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 <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix compilation warning due to missing header for sigaction (followup)Alexandre Raymond2011-06-081-4/+0
| | | | | | | | This patch removes all references to signal.h when qemu-common.h is included as they become redundant. Signed-off-by: Alexandre Raymond <cerbere@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* set $SDL_VIDEODRIVER=x11 on Linux to prevent sudo kvm from fighting for ↵Michael Tokarev2011-05-151-0/+12
| | | | | | | | video card Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* ui/sdl: Load optional QEMU iconStefan Weil2011-04-011-0/+13
| | | | | | | | | | | | | | | 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 or MS Windows while a QEMU instance is running. SDL requires icon files in 32x32x4 bmp format. Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Consolidate DisplaySurface allocation in qemu_alloc_display()Jes Sorensen2011-03-221-12/+8
| | | | | | | This removes various code duplication from console.e and sdl.c Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ui/sdl: Fix handling of caps lock and num lock keysStefan Weil2011-02-041-0/+8
| | | | | | | | | | | | | | | | | | | | 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). The workaround for SDL_KEYUP is only compiled with old SDL versions. A similar patch without handling of old SDL versions was already published by Benjamin Drung for Ubuntu. Cc: Anthony Liguori <aliguori@us.ibm.com> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Benjamin Drung <benjamin.drung@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* sdl: remove unused variableBlue Swirl2011-01-291-6/+0
| | | | | | | | | 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 <blauwirbel@gmail.com>
* win32: Avoid compiler warning (WIN32_LEAN_AND_MEAN redefined)Stefan Weil2010-08-151-0/+4
| | | | | | | | | | | | | | | | 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 compilations for win32 with warning = error). Fix this by removing the definition of WIN32_LEAN_AND_MEAN before including SDL_syswm.h. [blauwirbel@gmail.com: rebased] Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* ui: move all ui components in ui/Corentin Chary2010-07-261-0/+879
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 <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud