[PATCH] Add a return value to set_cursor_position() to allow it to report failure

Michael Thayer michael.thayer at oracle.com
Mon May 5 01:24:30 PDT 2014


On 30/04/14 19:23, Keith Packard wrote:
> Michael Thayer <michael.thayer at oracle.com> writes:
>
>> On 22/04/14 07:00, Keith Packard wrote:
>>> Michael Thayer <michael.thayer at oracle.com> writes:
>>>
>>>> set_cursor_position() may need to be able to fail and have the server fall
>>>> back to a software cursor in at least the situation in which we are running
>>>> on virtual hardware and using the host cursor as a hardware cursor for the
>>>> guest but cannot change its position.
>>>
>>> Frankly, the usual "solution" for nested or virtual X servers is to just
>>> ignore the cursor position assignment.
>>
>> I would still very much like to have the change if it considered
>> acceptable, and can submit an fixed patch like the one for
>> set_cursor_argb() and friends to force a driver build break.  Of course
>> if you tell me it is something that you would rather not have in I can
>> leave it at that.
>
> I don't see any value in allowing pointer warping to fail and setting a
> software cursor in response. If the next input event from the user isn't
> going to happen at the warped position, then you should be setting the
> cursor position before sending the next input event anyways.
>
> The alternative is for you to simply always use a software cursor, which
> would be easy to manage.

The cases I had in mind were pointer confining and input events from a 
different input device, both of which cause the position of the cursor 
sprite to differ from that of that reported by the input device for more 
than a negligible time.  No matter though, I can solve this as a 
fall-back with a client application which monitors the positions and 
tells the driver to disable the hardware cursor when needed.

Thanks and regards,

Michael
-- 
ORACLE Deutschland B.V. & Co. KG   Michael Thayer
Werkstrasse 24                     VirtualBox engineering
71384 Weinstadt, Germany           mailto:michael.thayer at oracle.com

Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Geschäftsführer: Jürgen Kunz

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher


More information about the xorg-devel mailing list