1. 21 Mar, 2010 1 commit
  2. 19 Mar, 2010 2 commits
    • Anthony Liguori's avatar
      Convert atexit users to exit_notifier · d7234f4d
      Anthony Liguori authored
      All of these users have global state so we really don't see a benefit from
      exit_notifier.  However, using exit_notifier means that there's one less
      justification for having global state in the first place.
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    • Anthony Liguori's avatar
      sdl: use mouse mode notifier · 3af12c86
      Anthony Liguori authored
      Today we poll the mouse mode whenever there is a mouse movement.  There is a
      subtle usability problem with this though.
      If we're in relative mode and grab is enabled, when we change to absolute mode,
      we break grab.  This gives a user a seamless transition when the new pointer
      is enabled.
      But because we poll for mouse change, this grab break won't occur until the user
      attempts to move the mouse.  By using notifiers, the grab break happens as soon
      as possible.
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
  3. 17 Mar, 2010 1 commit
    • Bjørn Mork's avatar
      sdl: improve error message on fatal error · b6034a39
      Bjørn Mork authored
      The SDL_SetVideoMode() error condition is easily triggered by a user by
      simply configure a guest with a host unsupported display resolution
      and attempting to enable fullscreen.  Since the error is fatal, adding
      a bit of debugging help can't harm.
      Sample output with this change:
       (qemu) Could not open SDL display (1280x1024x32): No video mode large enough for 1280x1024
      The width x height might seem redundant as SDL also provides it in
      SDL_GetError(), but I believe there are situations where it is
      useful.  I.e. if there is some other SDL error.  Anyway, redundant
      information in fatal error messages has never harmed a single gerbil.
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
  4. 08 Mar, 2010 1 commit
  5. 06 Mar, 2010 1 commit
  6. 19 Feb, 2010 1 commit
  7. 26 Jan, 2010 1 commit
  8. 29 Dec, 2009 1 commit
  9. 06 Oct, 2009 1 commit
  10. 01 Oct, 2009 2 commits
  11. 26 Sep, 2009 1 commit
  12. 09 Sep, 2009 1 commit
  13. 23 Aug, 2009 1 commit
    • Reimar Döffinger's avatar
      sdl.c: support 32 bpp cursors · 699960b2
      Reimar Döffinger authored
      currently when a 32 bpp cursor gets defined the result is all-black in
      the areas that are not transparent (you'll get a 32 bpp cursor if you
      use my previous patch to allow vmware_vga to use a 32 bpp framebuffer).
      This is because the switch in sdl.c lacks a 32 bpp case.
      The thing I am unsure about though is which byte is the unused one and
      should be skipped, the first or the last - for the black-and-white
      cursors I tested it doesn't make a difference...
      Signed-off-by: default avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
      Signed-off-by: default avatarAndrzej Zaborowski <balrogg@gmail.com>
  14. 10 Aug, 2009 1 commit
  15. 31 Jul, 2009 1 commit
  16. 27 Jul, 2009 1 commit
  17. 29 Jun, 2009 2 commits
  18. 17 May, 2009 1 commit
    • malc's avatar
      Only shutdown video subsytem in sdl_cleanup · d8ee7665
      malc authored
      Depending on the order in which atexit handlers are called SDL might
      try to join on an audio thread without said thread ever being notified
      that it must stop, hence QEMU will forever block in pthread_join call.
      Signed-off-by: default avatarmalc <av1474@comtv.ru>
  19. 13 Apr, 2009 1 commit
  20. 20 Mar, 2009 1 commit
  21. 13 Mar, 2009 1 commit
    • aliguori's avatar
      DisplayAllocator interface (Stefano Stabellini) · 7b5d76da
      aliguori authored
      Hi all,
      this patch adds a DisplayAllocator interface that allows display
      frontends (sdl in particular) to provide a preallocated display buffer
      for the graphical backend to use.
      Whenever a graphical backend cannot use
      qemu_create_displaysurface_from because its own internal pixel format
      cannot be exported directly (text mode or graphical mode with color
      depth 8 or 24), it creates another display buffer in memory using
      qemu_create_displaysurface and does the conversion.
      This new buffer needs to be blitted into the sdl surface buffer every time
      we need to update portions of the screen.
      We can avoid this using the DisplayAllocator interace: sdl provides its
      own implementation of qemu_create_displaysurface, giving back the sdl
      surface buffer directly (as we used to do before the DisplayState
      Since the buffer returned by sdl could be in bgr format we need to put
      back in the handlers of that case.
      This approach is good if the two following conditions are true:
      1) the sdl surface is a software surface that resides in main memory;
      2) the host display color depth is either 16 or 32 bpp.
      If first condition is false we can have bad performances using sdl
      and vnc together.
      If the second condition is false performances are certainly not going to
      improve but they shouldn't get worse either.
      The first condition is always true, at least on linux/X11 systems; but I
      believe is true also on other platforms.
      The second condition is true in the vast majority of the cases.
      This patch should also have the good side effect of solving the sdl
      2D slowness malc was reporting on MacOS, because SDL_BlitSurface is not
      going to be called anymore when the guest is in text mode or 24bpp.
      However the root problem is still present so I suspect we may
      still see some slowness on MacOS when the guest is in 32 or 16 bpp.
      Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6839 c046a42c-6fe2-441c-8c8c-71466251a162
  22. 08 Mar, 2009 1 commit
  23. 07 Mar, 2009 1 commit
  24. 06 Mar, 2009 1 commit
    • aliguori's avatar
      Refactor keymap code to avoid duplication ("Daniel P. Berrange") · 0483755a
      aliguori authored
      Each of the graphical frontends #include a .c file, for keymap code
      resulting in duplicated definitions & duplicated compiled code. A
      couple of small changes allowed this to be sanitized, so instead of
      doing a #include "keymaps.c", duplicating all code, we can have a
      shared keymaps.h file, and only compile code once. This allows the
      next patch to move the VncState struct out into a header file without
      causing clashing definitions.
       Makefile      |    9 +++++---
       b/keymaps.h   |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
       curses.c      |    3 --
       curses_keys.h |    9 +++-----
       keymaps.c     |   45 ++++++++++++++++---------------------------
       sdl.c         |    3 --
       sdl_keysym.h  |    7 ++----
       vnc.c         |    5 +---
       vnc_keysym.h  |    7 ++----
       9 files changed, 97 insertions(+), 51 deletions(-)
      Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6721 c046a42c-6fe2-441c-8c8c-71466251a162
  25. 03 Mar, 2009 1 commit
  26. 05 Feb, 2009 1 commit
  27. 29 Jan, 2009 2 commits
  28. 20 Jan, 2009 2 commits
  29. 15 Jan, 2009 3 commits
    • aliguori's avatar
      DisplayState interface change (Stefano Stabellini) · 7d957bd8
      aliguori authored
      This patch changes the DisplayState interface adding support for
      multiple frontends at the same time (sdl and vnc) and implements most
      of the benefit of the shared_buf patch without the added complexity.
      Currently DisplayState is managed by sdl (or vnc) and sdl (or vnc) is
      also responsible for allocating the data and setting the depth.
      Vga.c (or another backend) will do any necessary conversion.
      The idea is to change it so that is vga.c (or another backend) together
      with console.c that fully manage the DisplayState interface allocating
      data and setting the depth (either 16 or 32 bit, if the guest uses a
      different resolution or is in text mode, vga.c (or another backend) is
      in charge of doing the conversion seamlessly).
      The other idea is that DisplayState supports *multiple* frontends
      like sdl and vnc; each of them can register some callbacks to be called
      when a display event occurs.
      The interesting changes are:
      - the new structures and related functions in console.h and console.c
      in particular the following functions are very helpful to manage a
      - console_select and qemu_console_resize in console.c
      this two functions manage multiple consoles on a single host display
      - moving code around in hw/vga.c
      as for the shared_buf patch this is necessary to be able to handle a dynamic
      DisplaySurface bpp
      - changes to vga_draw_graphic in hw/vga.c
      this is the place where the DisplaySurface buffer is shared with the
      videoram, when possible;
      Compared to the last version the only changes are:
      - do not remove support to dpy_copy in cirrus_vga
      - change the name of the displaysurface handling functions
      Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6336 c046a42c-6fe2-441c-8c8c-71466251a162
    • aliguori's avatar
      remove bgr (Stefano Stabellini) · 8927bcfd
      aliguori authored
      Do not handle bgr host displays in the backends.
      Right now a bgr flag exists so that sdl can set it, if the SDL_Surface
      is bgr.
      Afterwards the graphic device (e.g. vga.c) does the needed conversion.
      With this patch series is sdl that is responsible for rendering the format
      provided by the graphic device that must provide a DisplaySurface
      (ds->surface) in 16 or 32 bpp, rgb.
      Afterwards sdl creates a SDL_Surface from the given DisplaySurface and
      blits it into the main SDL_Surface using SDL_BlitSurface.
      Everything is handled by sdl transparently, because SDL_BlitSurface is
      perfectly capable of handling bgr displays by itself.
      Signed-off-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6335 c046a42c-6fe2-441c-8c8c-71466251a162
    • aliguori's avatar
      Handle SDL grabs failing (Mark McLoughlin) · 6bb81603
      aliguori authored
      If a X window is not viewable, XGrabPointer() fails and
      returns GrabNotViewable. SDL's X backend currently handles
      this by retrying the grab until the window becomes viewable
      This means e.g. if you Ctrl-Alt-RightArrow to switch
      workspaces, QEMU tries to grab, SDL blocks because the
      window isn't viewable and your guest stops executing until
      you switch back to that workspace again.
      See this Fedora bug for the gory details:
      Some SDL backends will return SDL_GRAB_OFF from
      SDL_WM_GrabInput(), so the fix is to make the X backend do
      this if the grab fails.
      The only side-effect in QEMU is that if SDL_WM_GrabInput()
      fails we still change the window title to indicate that it's
      grabbed, when in fact it's not. This patch fixes that minor
      Signed-off-by: default avatarMark McLoughlin <markmc@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6325 c046a42c-6fe2-441c-8c8c-71466251a162
  30. 21 Aug, 2008 2 commits
  31. 24 Jul, 2008 1 commit
  32. 23 Jul, 2008 1 commit