Skip to content
Snippets Groups Projects

protocol: Add support for side mouse buttons

5 unresolved threads

Side mouse buttons currently do not exist in the protocol, causing them to be inexplicably ignored by VMs in virt-manager and such. This lays the groundwork for fixing that issue.

I have also already implemented this in spice-server, spice-gtk and the Linux vd-agent. I plan on submitting MRs for those projects as well if this is accepted.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
344 346 SPICE_MOUSE_BUTTON_MASK_LEFT = (1 << 0),
345 347 SPICE_MOUSE_BUTTON_MASK_MIDDLE = (1 << 1),
346 348 SPICE_MOUSE_BUTTON_MASK_RIGHT = (1 << 2),
349 SPICE_MOUSE_BUTTON_MASK_SIDE = (1 << 3),
350 SPICE_MOUSE_BUTTON_MASK_EXTRA = (1 << 4),
347 351
348 SPICE_MOUSE_BUTTON_MASK_MASK = 0x7
352 SPICE_MOUSE_BUTTON_MASK_MASK = 0x1F
  • 230 230 #define VD_AGENT_RBUTTON_MASK (1 << 3)
    231 231 #define VD_AGENT_UBUTTON_MASK (1 << 4)
    232 232 #define VD_AGENT_DBUTTON_MASK (1 << 5)
    233 #define VD_AGENT_SBUTTON_MASK (1 << 6)
    234 #define VD_AGENT_EBUTTON_MASK (1 << 7)
    • I think it would be great to keep this VD_AGENT_xBUTTON_ list in sync with SPICE_BUTTON_MASK_ one. There is a code in the server that could use this sync to support any future button too.

      @kpouget, what do you think? Recently you had a PoC about this.

    • Please register or sign in to reply
    • @SimonPilkington yes, I think we had the same issue, it was working well on my workstation with Wayland, and it didn't work in the environment of the guy who ask for the feature. I didn't try to understand why it was failing for him, but Wayland vs Xorg must be the explanation!

    • Thanks for confirming. I was able to get around it using my idea above. Tested only with Xwayland but I don't see why it wouldn't work on a full Xorg session.

    • The problem here is not the patches for the protocol but to fill and use these bits reliably. I think GDK or other layer do not reliably set additional bits so it could be that the bits you are testing are not the one you expect (so empty or referring to other buttons). Same issues for both guest and client side. For instance I remember that GTK on X11 copy some bytes ("detail" field) from X11 but bit outside left/right/middle buttons have different meaning based on the device so you can't assume that bit 3 have a specific meaning.

    • Please register or sign in to reply
  • added 1 commit

    • 4a5c43e1 - Use same order for SPICE protocol and agent protocol

    Compare with previous version

  • added 1 commit

    • a24e5fa6 - protocol: Add support for side mouse buttons

    Compare with previous version

  • mentioned in issue spice#45 (closed)

  • Merged this change. Maybe future general discussions on this subject should be done on spice#45 (closed).

  • Joan Bruguera mentioned in merge request spice-gtk!96 (merged)

    mentioned in merge request spice-gtk!96 (merged)

  • Please register or sign in to reply
    Loading