Skip to content
Snippets Groups Projects
  1. Jun 03, 2016
  2. May 19, 2016
  3. May 18, 2016
  4. May 13, 2016
    • Alberto Garcia's avatar
      gtk: don't leak the GtkBorder with VTE 0.36 · 6978dc4a
      Alberto Garcia authored
      
      When gtk_widget_style_get() is used to get the "inner-border" style
      property, it returns a copy of the GtkBorder which must be freed by
      the caller.
      
      This patch also fixes a warning about the unused 'padding' structure
      with VTE 0.36.
      
      Signed-off-by: default avatarAlberto Garcia <berto@igalia.com>
      Message-id: 1463127654-5171-1-git-send-email-berto@igalia.com
      Cc: Cole Robinson <crobinso@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      
      [ kraxel: adapted to changes in ui patch queue ]
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      6978dc4a
  5. May 12, 2016
  6. May 11, 2016
    • Cole Robinson's avatar
      ui: gtk: Fix some deprecation warnings · bb732ee7
      Cole Robinson authored
      
      All device manager APIs are deprecated now. Much of our usage is
      just to get the current pointer, so centralize that logic and use
      the new seat APIs
      
      Signed-off-by: default avatarCole Robinson <crobinso@redhat.com>
      Message-id: d6dec24220a4e1449a0172119c10c48e145c0f6f.1462557436.git.crobinso@redhat.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      bb732ee7
    • Cole Robinson's avatar
      ui: gtk: Fix a runtime warning on vte >= 0.37 · 84e2dc4b
      Cole Robinson authored
      
      inner-border was dropped in vte API 2.91, in favor of the standard
      padding style
      
      Signed-off-by: default avatarCole Robinson <crobinso@redhat.com>
      Message-id: 60a6cdc337d611d902f53907e66a8f37ea374d65.1462557436.git.crobinso@redhat.com
      
      [ kraxel: Fix warning with old vte version. ]
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      84e2dc4b
    • Cole Robinson's avatar
      ui: sdl2: Release grab before opening console window · 56f289f3
      Cole Robinson authored
      sdl 2.0.4 currently has a bug which causes our UI shortcuts to fire
      rapidly in succession:
      
        https://bugzilla.libsdl.org/show_bug.cgi?id=3287
      
      
      
      It's a toss up whether ctrl+alt+f or ctrl+alt+2 will fire an
      odd or even number of times, thus determining whether the action
      succeeds or fails.
      
      Opening monitor/serial windows is doubly broken, since it will often
      lock the UI trying to grab the pointer:
      
        0x00007fffef3720a5 in SDL_Delay_REAL () at /lib64/libSDL2-2.0.so.0
        0x00007fffef3688ba in X11_SetWindowGrab () at /lib64/libSDL2-2.0.so.0
        0x00007fffef2f2da7 in SDL_SendWindowEvent () at /lib64/libSDL2-2.0.so.0
        0x00007fffef2f080b in SDL_SetKeyboardFocus () at /lib64/libSDL2-2.0.so.0
        0x00007fffef35d784 in X11_DispatchFocusIn.isra.8 () at /lib64/libSDL2-2.0.so.0
        0x00007fffef35dbce in X11_DispatchEvent () at /lib64/libSDL2-2.0.so.0
        0x00007fffef35ee4a in X11_PumpEvents () at /lib64/libSDL2-2.0.so.0
        0x00007fffef2eea6a in SDL_PumpEvents_REAL () at /lib64/libSDL2-2.0.so.0
        0x00007fffef2eeab5 in SDL_WaitEventTimeout_REAL () at /lib64/libSDL2-2.0.so.0
        0x000055555597eed0 in sdl2_poll_events (scon=0x55555876f928) at ui/sdl2.c:593
      
      We can work around that hang by ungrabbing the pointer before launching
      a new window. This roughly matches what our sdl1 code does
      
      Signed-off-by: default avatarCole Robinson <crobinso@redhat.com>
      Message-id: 31c9ab6540b031f7a614c59edcecea9877685612.1462557436.git.crobinso@redhat.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      56f289f3
    • Cole Robinson's avatar
      ui: gtk: fix crash when terminal inner-border is NULL · 4fd811a6
      Cole Robinson authored
      
      VTE terminal inner-border can be NULL. The vte-0.36 (API 2.90)
      code checks for the condition too so I assume it's not just a bug
      
      Fixes a crash on Fedora 24 with gtk 3.20
      
      Signed-off-by: default avatarCole Robinson <crobinso@redhat.com>
      Message-id: 2b2e85d403e8760ea53afd735a170500d5c17716.1462557436.git.crobinso@redhat.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      4fd811a6
  7. Apr 13, 2016
  8. Apr 11, 2016
    • Gerd Hoffmann's avatar
      ui/virtio-gpu: add and use qemu_create_displaysurface_pixman · ca58b45f
      Gerd Hoffmann authored
      
      Add a the new qemu_create_displaysurface_pixman function, to create
      a DisplaySurface backed by an existing pixman image.  In that case
      there is no need to create a new pixman image pointing to the same
      backing storage.  We can just use the existing image directly.
      
      This does not only simplify things a bit, but most importantly it
      gets the reference counting right, so the backing storage for the
      pixman image wouldn't be released underneath us.
      
      Use new function in virtio-gpu, where using it actually fixes
      use-after-free crashes.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1459499240-742-1-git-send-email-kraxel@redhat.com
      ca58b45f
  9. Apr 04, 2016
  10. Mar 24, 2016
  11. Mar 23, 2016
  12. Mar 22, 2016
    • Veronia Bahaa's avatar
      util: move declarations out of qemu-common.h · f348b6d1
      Veronia Bahaa authored
      
      Move declarations out of qemu-common.h for functions declared in
      utils/ files: e.g. include/qemu/path.h for utils/path.c.
      Move inline functions out of qemu-common.h and into new files (e.g.
      include/qemu/bcd.h)
      
      Signed-off-by: default avatarVeronia Bahaa <veroniabahaa@gmail.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      f348b6d1
    • Markus Armbruster's avatar
      Use scripts/clean-includes to drop redundant qemu/typedefs.h · 14b6d44d
      Markus Armbruster authored
      
      Re-run scripts/clean-includes to apply the previous commit's
      corrections and updates.  Besides redundant qemu/typedefs.h, this only
      finds a redundant config-host.h include in ui/egl-helpers.c.  No idea
      how that escaped the previous runs.
      
      Some manual whitespace trimming around dropped includes squashed in.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      14b6d44d
    • Markus Armbruster's avatar
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster authored
      
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  13. Mar 18, 2016
    • Eric Blake's avatar
      qapi: Don't special-case simple union wrappers · 32bafa8f
      Eric Blake authored
      
      Simple unions were carrying a special case that hid their 'data'
      QMP member from the resulting C struct, via the hack method
      QAPISchemaObjectTypeVariant.simple_union_type().  But by using
      the work we started by unboxing flat union and alternate
      branches, coupled with the ability to visit the members of an
      implicit type, we can now expose the simple union's implicit
      type in qapi-types.h:
      
      | struct q_obj_ImageInfoSpecificQCow2_wrapper {
      |     ImageInfoSpecificQCow2 *data;
      | };
      |
      | struct q_obj_ImageInfoSpecificVmdk_wrapper {
      |     ImageInfoSpecificVmdk *data;
      | };
      ...
      | struct ImageInfoSpecific {
      |     ImageInfoSpecificKind type;
      |     union { /* union tag is @type */
      |         void *data;
      |-        ImageInfoSpecificQCow2 *qcow2;
      |-        ImageInfoSpecificVmdk *vmdk;
      |+        q_obj_ImageInfoSpecificQCow2_wrapper qcow2;
      |+        q_obj_ImageInfoSpecificVmdk_wrapper vmdk;
      |     } u;
      | };
      
      Doing this removes asymmetry between QAPI's QMP side and its
      C side (both sides now expose 'data'), and means that the
      treatment of a simple union as sugar for a flat union is now
      equivalent in both languages (previously the two approaches used
      a different layer of dereferencing, where the simple union could
      be converted to a flat union with equivalent C layout but
      different {} on the wire, or to an equivalent QMP wire form
      but with different C representation).  Using the implicit type
      also lets us get rid of the simple_union_type() hack.
      
      Of course, now all clients of simple unions have to adjust from
      using su->u.member to using su->u.member.data; while this touches
      a number of files in the tree, some earlier cleanup patches
      helped minimize the change to the initialization of a temporary
      variable rather than every single member access.  The generated
      qapi-visit.c code is also affected by the layout change:
      
      |@@ -7393,10 +7393,10 @@ void visit_type_ImageInfoSpecific_member
      |     }
      |     switch (obj->type) {
      |     case IMAGE_INFO_SPECIFIC_KIND_QCOW2:
      |-        visit_type_ImageInfoSpecificQCow2(v, "data", &obj->u.qcow2, &err);
      |+        visit_type_q_obj_ImageInfoSpecificQCow2_wrapper_members(v, &obj->u.qcow2, &err);
      |         break;
      |     case IMAGE_INFO_SPECIFIC_KIND_VMDK:
      |-        visit_type_ImageInfoSpecificVmdk(v, "data", &obj->u.vmdk, &err);
      |+        visit_type_q_obj_ImageInfoSpecificVmdk_wrapper_members(v, &obj->u.vmdk, &err);
      |         break;
      |     default:
      |         abort();
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <1458254921-17042-13-git-send-email-eblake@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      32bafa8f
  14. Mar 16, 2016
  15. Mar 09, 2016
  16. Mar 08, 2016
    • Gerd Hoffmann's avatar
      input-linux: add switch to enable auto-repeat events · a6ccabd6
      Gerd Hoffmann authored
      
      Enable with "-input-linux /dev/input/${device},repeat=on".
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1457087116-4379-4-git-send-email-kraxel@redhat.com
      a6ccabd6
    • Gerd Hoffmann's avatar
      input-linux: add option to toggle grab on all devices · 46d921be
      Gerd Hoffmann authored
      
      Maintain a list of all input devices.  Add an option to make grab
      work across all devices (so toggling grab on the keybard can switch
      over the mouse too).
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1457087116-4379-3-git-send-email-kraxel@redhat.com
      46d921be
    • Gerd Hoffmann's avatar
      input: linux evdev support · e0d2bd51
      Gerd Hoffmann authored
      
      This patch adds support for reading input events directly from linux
      evdev devices and forward them to the guest.  Unlike virtio-input-host
      which simply passes on all events to the guest without looking at them
      this will interpret the events and feed them into the qemu input
      subsystem.
      
      Therefore this is limited to what the qemu input subsystem and the
      emulated input devices are able to handle.  Also there is no support for
      absolute coordinates (tablet/touchscreen).  So we are talking here about
      basic mouse and keyboard support.
      
      The advantage is that it'll work without virtio-input drivers in the
      guest, the events are delivered to the usual ps/2 or usb input devices
      (depending on what the machine happens to have).  And for keyboards
      qemu is able to switch the keyboard between guest and host on hotkey.
      The hotkey is hard-coded for now (both control keys), initialy the
      guest owns the keyboard.
      
      Probably most useful when assigning vga devices with vfio and using a
      physical monitor instead of vnc/spice/gtk as guest display.
      
      Usage:  Add '-input-linux /dev/input/event<nr>' to the qemu command
      line.  Note that udev has rules which populate /dev/input/by-{id,path}
      with static names, which might be more convinient to use.
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1457087116-4379-2-git-send-email-kraxel@redhat.com
      e0d2bd51
    • Frediano Ziglio's avatar
      vnc: send cursor when a new client is connecting · 91ec41dc
      Frediano Ziglio authored
      
      If you have hardware cursor and you are reconnecting the VNC client
      you need to send the cursor. Failing to do so make the cursor invisible
      till is changed.
      
      Signed-off-by: default avatarFrediano Ziglio <fziglio@redhat.com>
      Message-id: 1456929142-14033-1-git-send-email-fziglio@redhat.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      91ec41dc
  17. Mar 05, 2016
    • Eric Blake's avatar
      qapi: Avoid use of 'data' member of QAPI unions · 10f75907
      Eric Blake authored
      
      QAPI code generators currently create a 'void *data' member as
      part of the anonymous union embedded in the C struct corresponding
      to a QAPI union.  However, directly assigning to this member of
      the union feels a bit fishy, when we can assign to another member
      of the struct instead.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1457021813-10704-9-git-send-email-eblake@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      10f75907
    • Eric Blake's avatar
      ui: Shorten references into InputEvent · b5a1b443
      Eric Blake authored
      
      An upcoming patch will alter how simple unions, like InputEvent, are
      laid out, which will impact all lines of the form 'evt->u.XXX'
      (expanding it to the longer 'evt->u.XXX.data').  For better
      legibility in that patch, and less need for line wrapping, it's better
      to use a temporary variable to reduce the effect of a layout change to
      just the variable initializations, rather than every reference within
      an InputEvent.
      
      There was one instance in hid.c:hid_pointer_event() where the code
      was referring to evt->u.rel inside the case label where evt->u.abs
      is the correct name; thankfully, both members of the union have the
      same type, so it happened to work, but it is now cleaner.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <1457021813-10704-8-git-send-email-eblake@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      b5a1b443
Loading