[PATCH weston] input: make sure we repick the focus surface after the old one is destroyed

Giulio Camuffo giuliocamuffo at gmail.com
Tue Jul 9 12:27:16 PDT 2013


I don't think it will. Normally there is always a focus surface, the
background if there is nothing above it. This patch only changes the
behavior when there is not a focus surface, and i think the only case is
when the surface is deleted.


2013/7/9 Bill Spitzak <spitzak at gmail.com>

> Will this cause unexpected drag + raise events to be sent to whatever
> surface is now under the mouse?
>
> IMHO this is acceptable, but considering some other patches being posted
> here some will disagree. They want the server to deliver an exactly
> specified sequence of events with matching up/down to each client.
>
>
> Giulio Camuffo wrote:
>
>> currently defult_grab_focus does not repick a surface if a mouse
>> button is pressed. change it so it does repick if there is no
>> current focus surface, like when the focus gets destroyed, so the
>> cursor does not disappear.
>> ---
>>  src/input.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/input.c b/src/input.c
>> index a7a37e5..76ce81a 100644
>> --- a/src/input.c
>> +++ b/src/input.c
>> @@ -102,7 +102,7 @@ default_grab_focus(struct weston_pointer_grab *grab)
>>         struct weston_surface *surface;
>>         wl_fixed_t sx, sy;
>>  -      if (pointer->button_count > 0)
>> +       if (pointer->button_count > 0 && pointer->focus)
>>                 return;
>>         surface = weston_compositor_pick_**surface(pointer->seat->**
>> compositor,
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130709/dbe481d8/attachment.html>


More information about the wayland-devel mailing list