1. 18 5月, 2016 1 次提交
  2. 04 4月, 2016 1 次提交
  3. 23 3月, 2016 2 次提交
  4. 01 3月, 2016 1 次提交
  5. 08 2月, 2016 1 次提交
  6. 17 12月, 2015 2 次提交
    • E
      qapi: Change munging of CamelCase enum values · d20a580b
      Eric Blake 提交于
      When munging enum values, the fact that we were passing the entire
      prefix + value through camel_to_upper() meant that enum values
      spelled with CamelCase could be turned into CAMEL_CASE.  However,
      this provides a potential collision (both OneTwo and One-Two would
      munge into ONE_TWO) for enum types, when the same two names are
      valid side-by-side as QAPI member names.  By changing the generation
      of enum constants to always be prefix + '_' + c_name(value,
      False).upper(), and ensuring that there are no case collisions (in
      the next patches), we no longer have to worry about names that
      would be distinct as QAPI members but collide as variant tag names,
      without having to think about what munging the heuristics in
      camel_to_upper() will actually perform on an enum value.
      
      Making the change will affect enums that did not follow coding
      conventions, using 'CamelCase' rather than desired 'lower-case'.
      
      Thankfully, there are only two culprits: InputButton and ErrorClass.
      We already tweaked ErrorClass to make it an alias of QapiErrorClass,
      where only the alias needs changing rather than the whole tree.  So
      the bulk of this change is modifying INPUT_BUTTON_WHEEL_UP to the
      new INPUT_BUTTON_WHEELUP (and likewise for WHEELDOWN).  That part
      of this commit may later need reverting if we rename the enum
      constants from 'WheelUp' to 'wheel-up' as part of moving
      x-input-send-event to a stable interface; but at least we have
      documentation bread crumbs in place to remind us (commit 513e7cdb),
      and it matches the fact that SDL constants are also spelled
      SDL_BUTTON_WHEELUP.
      
      Suggested by: Markus Armbruster <armbru@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1447836791-369-27-git-send-email-eblake@redhat.com>
      [Commit message tweaked]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      d20a580b
    • E
      qapi: Don't let implicit enum MAX member collide · 7fb1cf16
      Eric Blake 提交于
      Now that we guarantee the user doesn't have any enum values
      beginning with a single underscore, we can use that for our
      own purposes.  Renaming ENUM_MAX to ENUM__MAX makes it obvious
      that the sentinel is generated.
      
      This patch was mostly generated by applying a temporary patch:
      
      |diff --git a/scripts/qapi.py b/scripts/qapi.py
      |index e6d014b..b862ec9 100644
      |--- a/scripts/qapi.py
      |+++ b/scripts/qapi.py
      |@@ -1570,6 +1570,7 @@ const char *const %(c_name)s_lookup[] = {
      |     max_index = c_enum_const(name, 'MAX', prefix)
      |     ret += mcgen('''
      |     [%(max_index)s] = NULL,
      |+// %(max_index)s
      | };
      | ''',
      |                max_index=max_index)
      
      then running:
      
      $ cat qapi-{types,event}.c tests/test-qapi-types.c |
          sed -n 's,^// \(.*\)MAX,s|\1MAX|\1_MAX|g,p' > list
      $ git grep -l _MAX | xargs sed -i -f list
      
      The only things not generated are the changes in scripts/qapi.py.
      
      Rejecting enum members named 'MAX' is now useless, and will be dropped
      in the next patch.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1447836791-369-23-git-send-email-eblake@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      [Rebased to current master, commit message tweaked]
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      7fb1cf16
  7. 02 12月, 2015 1 次提交
  8. 11 11月, 2015 2 次提交
  9. 16 10月, 2015 2 次提交
  10. 14 10月, 2015 1 次提交
  11. 26 9月, 2015 3 次提交
  12. 19 9月, 2015 1 次提交
  13. 19 6月, 2015 3 次提交
  14. 19 5月, 2015 9 次提交
  15. 22 9月, 2014 1 次提交
    • S
      block: delete cow block driver · 550830f9
      Stefan Hajnoczi 提交于
      This patch removes support for the cow file format.
      
      Normally we do not break backwards compatibility but in this case there
      is no impact and it is the most logical option.  Extraordinary claims
      require extraordinary evidence so I will show why removing the cow block
      driver is the right thing to do.
      
      The cow file format is the disk image format for Usermode Linux, a way
      of running a Linux system in userspace.  The performance of UML was
      never great and it was hacky, but it enjoyed some popularity before
      hardware virtualization support became mainstream.
      
      QEMU's block/cow.c is supposed to read this image file format.
      Unfortunately the file format was underspecified:
      
      1. Earlier Linux versions used the MAXPATHLEN constant for the backing
         filename field.  The value of MAXPATHLEN can change, so Linux
         switched to a 4096 literal but QEMU has a 1024 literal.
      
      2. Padding was not used on the header struct (both in the Linux kernel
         and in QEMU) so the struct layout varied across architectures.  In
         particular, i386 and x86_64 were different due to int64_t alignment
         differences.  Linux now uses __attribute__((packed)), QEMU does not.
      
      Therefore:
      
      1. QEMU cow images do not conform to the Linux cow image file format.
      
      2. cow images cannot be shared between different host architectures.
      
      This means QEMU cow images are useless and QEMU has not had bug reports
      from users actually hitting these issues.
      
      Let's get rid of this thing, it serves no purpose and no one will be
      affected.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 1410877464-20481-1-git-send-email-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      550830f9
  16. 30 6月, 2014 4 次提交
    • P
      ui/cocoa: Honour -show-cursor command line option · 13aefd30
      Peter Maydell 提交于
      Honour the -show-cursor command line option (which forces the mouse pointer
      to always be displayed even when input is grabbed) in the Cocoa UI backend.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1403516125-14568-5-git-send-email-peter.maydell@linaro.org
      13aefd30
    • P
      ui/cocoa: Fix handling of absolute positioning devices · f61c387e
      Peter Maydell 提交于
      Fix handling of absolute positioning devices, which were basically
      unusable for two separate reasons:
       (1) as soon as you pressed the left mouse button we would call
           CGAssociateMouseAndMouseCursorPosition(FALSE), which means that
           the absolute coordinates of the mouse events are never updated
       (2) we didn't account for MacOSX coordinate origin being bottom left
           rather than top right, and so all the Y values sent to the guest
           were inverted
      
      We fix (1) by aligning our behaviour with the SDL UI backend for
      absolute devices:
       * when the mouse moves into the window we do a grab (which means
         hiding the host cursor and sending special keys to the guest)
       * when the mouse moves out of the window we un-grab
      and fix (2) by doing the correct transformation in the call to
      qemu_input_queue_abs().
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1403516125-14568-4-git-send-email-peter.maydell@linaro.org
      f61c387e
    • P
      ui/cocoa: Add utility method to check if point is within window · 5dd45bee
      Peter Maydell 提交于
      Add a utility method to check whether a point is within the current window
      bounds, and use it in the various places in the mouse handling code that
      were opencoding the check.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1403516125-14568-3-git-send-email-peter.maydell@linaro.org
      5dd45bee
    • P
      ui/cocoa: Cope with first surface being same as initial window size · 381600da
      Peter Maydell 提交于
      Do the recalculation of the content dimensions in switchSurface if the
      current cdx is zero as well as if the new surface is a different size to
      the current window. This catches the case where the first surface registered
      happens to be 640x480 (our current window size), and fixes a bug where we
      would always display a black screen until the first surface of a different
      size was registered.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1403516125-14568-2-git-send-email-peter.maydell@linaro.org
      381600da
  17. 05 3月, 2014 2 次提交
  18. 13 1月, 2014 3 次提交
    • P
      ui/cocoa: Remove stray tabs · 49060c29
      Peter Maydell 提交于
      The ui/cocoa.m file has just three lines with hardcoded tabs; fix them.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NStefan Weil <sw@weilnetz.de>
      Message-id: 1387886052-27067-1-git-send-email-peter.maydell@linaro.org
      49060c29
    • P
      ui/cocoa: Draw black rectangle if we have no data yet · 7d270b1c
      Peter Maydell 提交于
      If our redraw method is called before we have any data from the guest,
      then draw a black rectangle rather than leaving the window empty.
      This mostly only matters when the guest machine has no framebuffer
      device, but it is more in line with the behaviour of other QEMU UIs.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1387853507-26298-3-git-send-email-peter.maydell@linaro.org
      7d270b1c
    • P
      ui/cocoa: Redraw at correct size when switching surface · d3345a04
      Peter Maydell 提交于
      If the surface switch involved a resize, we were doing the redraw
      at the old size rather than the new, because the update of
      screen.width and screen.height was being done after the setFrame
      method calls which triggered a redraw. Normally this isn't very
      noticeable because typically after the guest triggers the window
      resize it also draws something to it, which will in turn cause
      us to redraw. However, the combination of a guest which never
      draws to the display and a command line setting of a screen size
      larger than the default can reveal odd effects.
      
      Move most of the handling of resizes to the top of the method,
      and guard it with a check that the surface size actually changed,
      to avoid unnecessary operations (including some user visible ones
      like "recenter the window on the screen") if the surface is the
      same size as the old one.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1387853507-26298-2-git-send-email-peter.maydell@linaro.org
      d3345a04