History | View | Annotate | Download (27.1 kB)
console: zap ds arg from register_displaychangelistener
We don't have multiple DisplayStates any more,so passing it in as argument is not needed.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
console: add qemu_console_is_*
console: gui timer fixes
Make gui update rate adaption code in gui_update() actually work.Sprinkle in a tracepoint so you can see the code at work. Removethe update rate adaption code in vnc and make vnc simply use thegeneric bits instead.
console: rename vga_hw_*, add QemuConsole param
Add QemuConsole parameter to vga_hw_*, so the interface allows to updatenon-active consoles (the actual code can't handle this yet, see nextpatch). Passing NULL is allowed and updates the active console, like...
sdl: stop using DisplayState
Rework DisplayStateListener callbacks to not use the DisplayStateany more.
console: zap displaystate from dcl callbacks
Now that nobody depends on DisplayState in DisplayChangeListenercallbacks any more we can remove the parameter from all callbacks.
console: fix displaychangelisteners interface
Split callbacks into separate Ops struct. Pass DisplayChangeListenerpointer as first argument to all callbacks. Uninline a bunch ofdisplay functions and move them from console.h to console.c
sdl: drop dead code
DisplayAllocator removal (commit187cd1d9f30d13f0d0ef682e4d91cfa3e4cbd472) made this a nop.
console: rework DisplaySurface handling [dcl/ui side]
Replace the dpy_gfx_resize and dpy_gfx_setdata DisplayChangeListenercallbacks with a dpy_gfx_switch callback which notifies the ui codewhen the framebuffer backing storage changes.
softmmu: move include files to include/sysemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
ui: move files to ui/ and include/ui/
console: untangle gfx & txt updates
Stop abusing displaysurface fields for text mode displays.(bpp = 0, width = cols, height = lines).
Add flags to displaystate indicating whenever text mode display(curses) or gfx mode displays (sdl, vnc, ...) are present....
console: remove dpy_gfx_fill
Unused code. 'nuff said.
console: remove DisplayAllocator
Causes [temporary] preformance regression with 24bpp vga modes @ sdl.
console: move set_mouse + cursor_define callbacks
When adding DisplayChangeListeners the set_mouse and cursor_definecallbacks have been left in DisplayState for some reason. Fix it.
sdl: remove NULL check, g_malloc0 can't fail
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
sdl: Fix block prevention of SDL_WM_GrabInput
Consistently check for SDL_APPINPUTFOCUS before trying to grab the inputfocus. Just checking for SDL_APPACTIVE doesn't work. Moving the check tosdl_grab_start allows for some consolidation.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Revert "Handle SDL grabs failing (Mark McLoughlin)"
This reverts commit 6bb816031f8bc0aafc3476e6dfa4293ee3a5f106.
SDL_WM_GrabInput does not reliably bail out if grabbing is impossible.So if we get here, we already lost and will block. But this can nolonger happen due to the check in sdl_grab_start. So this patch became...
sdl: Grab input on end of non-absolute mouse click
By grabbing the input already on button down, we leave the button inthat state for the host GUI. Thus it takes another click after releasingthe input again to synchronize the mouse button state.
Avoid this by grabbing on button up....
sdl: Limit sdl_grab_end in handle_activation to Windows hosts
There are scenarios on Linux with some SDL versions wherehandle_activation is continuous invoked with state = SDL_APPINPUTFOCUSand gain = 0 while we grabbed the input. This causes a ping-pong when we...
sdl: Do not grab mouse on mode switch while in background
When the mouse mode changes to absolute while the SDL windows is not infocus, refrain from grabbing the input. It would steal from some otherwindow.
Drop the vm_running global variable
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 mode
While in full-screen mode, the input focus naturally belongs to the SDLwindow. Avoid dropping it when switching from absolute to relativemouse mode.
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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 <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sdl: Fix full screen toggling from scaled mode
When switching to full screen mode from a scaled window, we need toresize to DisplayState's dimension, not the scaled "real" screen size.Moreover, scaling mode may have manipulated the bpp. So we need torestore it from the DisplayState as well....
sdl: Restore scaling mode on return from full screen
Save the scaling mode and its geometry when going full screen, restoreit when returning to windowed mode.
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
sdl: Drop bogus gui_fullscreen_initial_grab
There must be no difference between initial -full-screen and switchingto this mode via the hot key.
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.
sdl: Consistently avoid grabbing input for text consoles
There were some preexisting bits that released the input when switchingto text console. This patch spreads this logic consistently and alsoavoids grabbing the input while a text console is active....
sdl: Never release input while in full screen mode
It's confusing to suddenly find two mice in full screen mode whenswitching consoles or accidentally hitting the grab hot keys.
sdl: Fix cursor handling when switching consoles in absolute mouse mode
Restore the cursor when switching from graphic to text console while themouse is in absolute mode. Disable it again when returning.
sdl: Dynamically grab input in absolute mouse mode
Not grabbing the input means that special keys like ALT+TAB are stillhandled by the host. Improve the usability by grabbing input once themouse is inside the guest screen, provided the SDL window has the input...
sdl: Add zoom hot keys
Allow to enlarge or shrink the screen via CTRL-ALT-+/-. In contrast toscaling the window, these controls always preserve the aspect ratio ofthe current console.
sdl: Factor out event handlers from sdl_refresh
No functional changes.
sdl: Fix termination in -no-shutdown mode
Just like the monitor does, we need to clear no_shutdown before callingqemu_system_shutdown_request on quit requests. Otherwise, QEMU juststops the VM.
sdl: Do not make full screen mode resizable
This prevents continuous resizing events and improper screen setups whengoing 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: Avoid redundant scaling deactivation
Prevents screen flickering.
sdl: Properly mark modifier+u as hotkey
notifier: Pass data argument to callback
This allows to pass additional information to the notifier callbackwhich is useful if sender and receiver do not share any other distinctdata structure.
Will be used first for the clock reset notifier.
Fix compilation warning due to missing header for sigaction (followup)
This patch removes all references to signal.h when qemu-common.h is includedas 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 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 icon
Load an optional QEMU icon file. If there is no icon file namedqemu.bmp in QEMU's default search path, QEMU will run withthe usual system default icon.
A matching icon file will be loaded and used by X Windows managers...
Consolidate DisplaySurface allocation in qemu_alloc_display()
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 keys
Starting with SDL version 1.2.14, caps lock and num lock keyswill send a SDL_KEYUP when SDL_DISABLE_LOCK_KEYS=1 is set inthe environment.
The new code sets the environment unconditionally(it won't harm old versions which do not know it)....
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 <blauwirbel@gmail.com>
win32: Avoid compiler warning (WIN32_LEAN_AND_MEAN redefined)
configure adds the macro WIN32_LEAN_AND_MEAN toQEMU_CFLAGS, and SDL_syswm.h defines it, too.
This results in a compiler warning (redefinition ofWIN32_LEAN_AND_MEAN in SDL_syswm.h. That warning prevents...
ui: move all ui components in ui/
Move sdl, vnc, curses and cocoa UI into ui/ to cleanupthe root directory. Also remove some unnecessary explicittargets from Makefile.
aliguori: fix build when srcdir != objdir
Signed-off-by: Corentin Chary <corentincj@iksaif.net>...