Bug 1444472
Summary: | [RFE] Inverting mouse pointer | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Radek Duda <rduda> |
Component: | spice-gtk | Assignee: | Default Assignee for SPICE Bugs <rh-spice-bugs> |
Status: | CLOSED WONTFIX | QA Contact: | SPICE QE bug list <spice-qe-bugs> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 8.1 | CC: | dblechte, fziglio, rbalakri, rduda, spice-qe-bugs, tpelka, victortoso, ybendito |
Target Milestone: | rc | Keywords: | FutureFeature |
Target Release: | 8.1 | ||
Hardware: | Unspecified | ||
OS: | Windows | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-07-09 19:15:48 UTC | Type: | Feature Request |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Spice | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1425451 |
Description
Radek Duda
2017-04-21 12:07:31 UTC
Does Win7 QXL driver support inverted mouse correctly? (In reply to ybendito from comment #1) > Does Win7 QXL driver support inverted mouse correctly? According to test plan attached to https://bugzilla.redhat.com/show_bug.cgi?id=1425451 it should support it (see Test ID 2.3) it should support it. It also applies with reproduction step: Mouse properties-> pointers-> choose Scheme as 'Windows inverted' I noticed that mouse pointer is inverted during dragging of some window frame (change its colour to the colour inverted to the background) or when cursor is changed to 'move' shape (right click on 'title bar'). Otherwise the cursor remains white. Looks like it's inverted when Windows render it (on dragging usually Windows renders it). I tested with both VNC and Spice and the problem occurs with QXL (although on VNC you get a transparent mouse while on Spice a white one), not with VGA. So the problem seems QXL. Looking at QXLCursorCmd, QXLCursor (the structures passed from guest to server), spice.proto (client <-> server definition file) and SpiceCursorHeader (message structure) there's no support for inverted cursors. This means that this can currently be achieved only using software mouse (making Windows do the rendering). (In reply to Frediano Ziglio from comment #3) > Looks like it's inverted when Windows render it (on dragging usually Windows > renders it). > I tested with both VNC and Spice and the problem occurs with QXL (although > on VNC you get a transparent mouse while on Spice a white one), not with VGA. > So the problem seems QXL. > Looking at QXLCursorCmd, QXLCursor (the structures passed from guest to > server), spice.proto (client <-> server definition file) and > SpiceCursorHeader (message structure) there's no support for inverted > cursors. > This means that this can currently be achieved only using software mouse > (making Windows do the rendering). As far as I can see this is not supported on client side. Inverted cursor does not required any special support in spice-protocol. Windows driver receives it as regular 'monochrome cursor', which always has 2 bitmasks: 'AND' and 'XOR' (for example, https://msdn.microsoft.com/en-us/library/windows/desktop/ms648380(v=vs.85).aspx), when AND-XOR combination for each pixel defines pixel state: 00 (black), 01 (white), 10 (transparent), 11 (inverted). Spice client receives the masks, but spice-gtk converts them to ARGB color bitmap which can't describe inversion (but can describe transparency by alpha=0), then spice-gtk uses GDK for cursor creation from ARGB bitmap. GDK creates cursor and constructs AND-XOR bitmask for it, but this bitmask never contains inverted combination (inversion info was lost in previous conversion). I did not find GDK API that can create cursor with AND-XOR, so there is no simple fix. I'm going to remove this test from test plan. The bug can stay open until fixed in GDK/spice-gtk As per comment #4, moving to spice-gtk (In reply to ybendito from comment #4) > (In reply to Frediano Ziglio from comment #3) > > Looks like it's inverted when Windows render it (on dragging usually Windows > > renders it). > > I tested with both VNC and Spice and the problem occurs with QXL (although > > on VNC you get a transparent mouse while on Spice a white one), not with VGA. > > So the problem seems QXL. > > Looking at QXLCursorCmd, QXLCursor (the structures passed from guest to > > server), spice.proto (client <-> server definition file) and > > SpiceCursorHeader (message structure) there's no support for inverted > > cursors. > > This means that this can currently be achieved only using software mouse > > (making Windows do the rendering). > > As far as I can see this is not supported on client side. > > Inverted cursor does not required any special support in spice-protocol. > Windows driver receives it as regular 'monochrome cursor', which always has > 2 bitmasks: 'AND' and 'XOR' (for example, > https://msdn.microsoft.com/en-us/library/windows/desktop/ms648380(v=vs.85). > aspx), when AND-XOR combination for each pixel defines pixel state: 00 > (black), 01 (white), 10 (transparent), 11 (inverted). Spice client receives > the masks, but spice-gtk converts them to ARGB color bitmap which can't > describe inversion (but can describe transparency by alpha=0), then > spice-gtk uses GDK for cursor creation from ARGB bitmap. GDK creates cursor > and constructs AND-XOR bitmask for it, but this bitmask never contains > inverted combination (inversion info was lost in previous conversion). > I did not find GDK API that can create cursor with AND-XOR, so there is no > simple fix. You are right for mono cursors. However there are also colour inverted cursors (at least in Windows 10) where alpha channel specifies screen (0x00) or xor (0xff) operation. These would need support in the protocol too. (In reply to Frediano Ziglio from comment #7) > (In reply to ybendito from comment #4) > > (In reply to Frediano Ziglio from comment #3) > > > Looks like it's inverted when Windows render it (on dragging usually Windows > > > renders it). > > > I tested with both VNC and Spice and the problem occurs with QXL (although > > > on VNC you get a transparent mouse while on Spice a white one), not with VGA. > > > So the problem seems QXL. > > > Looking at QXLCursorCmd, QXLCursor (the structures passed from guest to > > > server), spice.proto (client <-> server definition file) and > > > SpiceCursorHeader (message structure) there's no support for inverted > > > cursors. > > > This means that this can currently be achieved only using software mouse > > > (making Windows do the rendering). > > > > As far as I can see this is not supported on client side. > > > > Inverted cursor does not required any special support in spice-protocol. > > Windows driver receives it as regular 'monochrome cursor', which always has > > 2 bitmasks: 'AND' and 'XOR' (for example, > > https://msdn.microsoft.com/en-us/library/windows/desktop/ms648380(v=vs.85). > > aspx), when AND-XOR combination for each pixel defines pixel state: 00 > > (black), 01 (white), 10 (transparent), 11 (inverted). Spice client receives > > the masks, but spice-gtk converts them to ARGB color bitmap which can't > > describe inversion (but can describe transparency by alpha=0), then > > spice-gtk uses GDK for cursor creation from ARGB bitmap. GDK creates cursor > > and constructs AND-XOR bitmask for it, but this bitmask never contains > > inverted combination (inversion info was lost in previous conversion). > > I did not find GDK API that can create cursor with AND-XOR, so there is no > > simple fix. > > You are right for mono cursors. However there are also colour inverted > cursors (at least in Windows 10) where alpha channel specifies screen (0x00) > or xor (0xff) operation. These would need support in the protocol too. Inverted scheme (included in Win10 and earlier) uses monochrome cursor layout to create cursor with screen inversion and this can be fixed on client side and does not depend on spice-server/protocol. Indeed, color cursor with inverted areas (I did not find built-in or custom cursors that use it) requires additional type of cursor in spice protocol. Currently the qxl-wddm-dod driver does not declare support for such format and if it will be supported by spice-protocol / client, this should be communicated to the windows guest driver via capabilities or other way. low priority, moving to rhel 8 (In reply to Frediano Ziglio from comment #7) > You are right for mono cursors. However there are also colour inverted > cursors (at least in Windows 10) where alpha channel specifies screen (0x00) > or xor (0xff) operation. These would need support in the protocol too. A RFE, keeping in the backlog for now. |