Skip to content
  • Frediano Ziglio's avatar
    5b57a87e
    ui: Add more mouse buttons to SPICE · 5b57a87e
    Frediano Ziglio authored
    
    
    Add support for SIDE and EXTRA buttons.
    
    The constants for buttons in both SPICE and QEMU are defined as
      LEFT
      MIDDLE
      RIGHT
      UP
      DOWN
      SIDE
      EXTRA
    (same order).
    
    "button_mask" contains for each bit the state of a button. Qemu currently
    uses bits 0, 1, 2 respectively as LEFT, RIGHT, MIDDLE; also add bits 4
    and 5 as UP and DOWN (using wheel movements). SPICE protocol uses
    a bitmask based on the order above where LEFT is bit 0, MIDDLE is
    bit 1 and so on till EXTRA being bit 6. To avoid clash with Qemu usage
    SPICE bitmask from SIDE are move a bit more resulting respectively
    in 0x40 and 0x80 values.
    
    Signed-off-by: default avatarFrediano Ziglio <freddy77@gmail.com>
    Message-id: 20200820145851.50846-1-fziglio@redhat.com
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    5b57a87e
    ui: Add more mouse buttons to SPICE
    Frediano Ziglio authored
    
    
    Add support for SIDE and EXTRA buttons.
    
    The constants for buttons in both SPICE and QEMU are defined as
      LEFT
      MIDDLE
      RIGHT
      UP
      DOWN
      SIDE
      EXTRA
    (same order).
    
    "button_mask" contains for each bit the state of a button. Qemu currently
    uses bits 0, 1, 2 respectively as LEFT, RIGHT, MIDDLE; also add bits 4
    and 5 as UP and DOWN (using wheel movements). SPICE protocol uses
    a bitmask based on the order above where LEFT is bit 0, MIDDLE is
    bit 1 and so on till EXTRA being bit 6. To avoid clash with Qemu usage
    SPICE bitmask from SIDE are move a bit more resulting respectively
    in 0x40 and 0x80 values.
    
    Signed-off-by: default avatarFrediano Ziglio <freddy77@gmail.com>
    Message-id: 20200820145851.50846-1-fziglio@redhat.com
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Loading