[PATCH wayland] protocol: Improve data source notification around DnD progress
Carlos Garnacho
carlosg at gnome.org
Thu Oct 1 12:57:45 PDT 2015
On Thu, Oct 1, 2015 at 8:48 PM, Bill Spitzak <spitzak at gmail.com> wrote:
>
>
> On Wed, Sep 30, 2015 at 1:45 PM, Carlos Garnacho <carlosg at gnome.org> wrote:
>>
>>
>> - wl_data_source.drop_performed: Happens when the operation has been
>> physically finished (eg. the button is released), it could be the right
>> place to reset the pointer cursor back and undo any other state
>> resulting
>> from the initial button press.
>
>
> This should not be necessary. When the grab is lost, whatever client is
> under the pointer should get an enter event and should then set the cursor
> to whatever it wants. The dnd source should certainly not set the cursor in
> this case because it may set it to the wrong one, resulting in a blink of
> this wrong cursor (ie it will quickly change between the drag cursor, the
> cursor the source thought it should be, and the actual cursor for that
> screen location).
Remember, toolkits preserve some state. The drag source is in control
of the pointer cursor as long as the DnD operation holds, so it should
reset its internal current cursor to the regular one for the next time
the pointer enters the surface. And that's the bare minimals to be
done there, in X11-land toolkits usually implemented DnD and its
cursor changes through a grab, at least in the case of GTK+ this is
carried on, and brings in a lot more side effects than just an
extraneous cursor, so really can't wait until the next
wl_pointer.enter.
Carlos
More information about the wayland-devel
mailing list