1. 03 6月, 2016 7 次提交
  2. 19 5月, 2016 1 次提交
  3. 18 5月, 2016 1 次提交
  4. 13 5月, 2016 1 次提交
    • A
      gtk: don't leak the GtkBorder with VTE 0.36 · 6978dc4a
      Alberto Garcia 提交于
      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: NAlberto 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: NGerd Hoffmann <kraxel@redhat.com>
      6978dc4a
  5. 12 5月, 2016 6 次提交
  6. 11 5月, 2016 4 次提交
    • C
      ui: gtk: Fix some deprecation warnings · bb732ee7
      Cole Robinson 提交于
      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: NCole Robinson <crobinso@redhat.com>
      Message-id: d6dec24220a4e1449a0172119c10c48e145c0f6f.1462557436.git.crobinso@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      bb732ee7
    • C
      ui: gtk: Fix a runtime warning on vte >= 0.37 · 84e2dc4b
      Cole Robinson 提交于
      inner-border was dropped in vte API 2.91, in favor of the standard
      padding style
      Signed-off-by: NCole Robinson <crobinso@redhat.com>
      Message-id: 60a6cdc337d611d902f53907e66a8f37ea374d65.1462557436.git.crobinso@redhat.com
      
      [ kraxel: Fix warning with old vte version. ]
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      84e2dc4b
    • C
      ui: sdl2: Release grab before opening console window · 56f289f3
      Cole Robinson 提交于
      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: NCole Robinson <crobinso@redhat.com>
      Message-id: 31c9ab6540b031f7a614c59edcecea9877685612.1462557436.git.crobinso@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      56f289f3
    • C
      ui: gtk: fix crash when terminal inner-border is NULL · 4fd811a6
      Cole Robinson 提交于
      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: NCole Robinson <crobinso@redhat.com>
      Message-id: 2b2e85d403e8760ea53afd735a170500d5c17716.1462557436.git.crobinso@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      4fd811a6
  7. 13 4月, 2016 1 次提交
  8. 11 4月, 2016 1 次提交
    • G
      ui/virtio-gpu: add and use qemu_create_displaysurface_pixman · ca58b45f
      Gerd Hoffmann 提交于
      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: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1459499240-742-1-git-send-email-kraxel@redhat.com
      ca58b45f
  9. 04 4月, 2016 1 次提交
  10. 24 3月, 2016 3 次提交
  11. 23 3月, 2016 5 次提交
  12. 18 3月, 2016 1 次提交
    • E
      qapi: Don't special-case simple union wrappers · 32bafa8f
      Eric Blake 提交于
      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: NEric Blake <eblake@redhat.com>
      Message-Id: <1458254921-17042-13-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      32bafa8f
  13. 17 3月, 2016 1 次提交
  14. 09 3月, 2016 1 次提交
  15. 08 3月, 2016 4 次提交
    • G
      input-linux: add switch to enable auto-repeat events · a6ccabd6
      Gerd Hoffmann 提交于
      Enable with "-input-linux /dev/input/${device},repeat=on".
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1457087116-4379-4-git-send-email-kraxel@redhat.com
      a6ccabd6
    • G
      input-linux: add option to toggle grab on all devices · 46d921be
      Gerd Hoffmann 提交于
      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: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1457087116-4379-3-git-send-email-kraxel@redhat.com
      46d921be
    • G
      input: linux evdev support · e0d2bd51
      Gerd Hoffmann 提交于
      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: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1457087116-4379-2-git-send-email-kraxel@redhat.com
      e0d2bd51
    • F
      vnc: send cursor when a new client is connecting · 91ec41dc
      Frediano Ziglio 提交于
      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: NFrediano Ziglio <fziglio@redhat.com>
      Message-id: 1456929142-14033-1-git-send-email-fziglio@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      91ec41dc
  16. 05 3月, 2016 2 次提交
    • E
      qapi: Avoid use of 'data' member of QAPI unions · 10f75907
      Eric Blake 提交于
      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: NEric Blake <eblake@redhat.com>
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1457021813-10704-9-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      10f75907
    • E
      ui: Shorten references into InputEvent · b5a1b443
      Eric Blake 提交于
      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: NEric Blake <eblake@redhat.com>
      Message-Id: <1457021813-10704-8-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      b5a1b443