wl_shell_surface_resize semantics

Kristian Høgsberg krh at bitplanet.net
Thu Dec 8 11:34:13 PST 2011


2011/12/8 Kristian Høgsberg <krh at bitplanet.net>:
> On Wed, Dec 7, 2011 at 5:56 AM, Daniel Stone <daniel at fooishbar.org> wrote:
>> Hi,
>>
>> On 7 December 2011 08:15, Pekka Paalanen <ppaalanen at gmail.com> wrote:
>>> I see the problem from a completely different point of view, similar to
>>> Rob.
>>>
>>> If we (the compositor) send a button press event to a client, we better
>>> be sending a button release event, too. Otherwise the client view of
>>> button state will be incorrect. It will not be a dummy or a faked
>>> event, it should be the real button release event, that would be sent
>>> to the client anyway if it was not resizing. The implicit grab on button
>>> press in the compositor is (AFAIU) supposed to guarantee that.
>>
>> Absolutely.  We always need to guarantee consistency: every button
>> press event must be matched by an explicit button release event.  We
>> cannot rely on clients to infer the event and generate their own fake
>> events, because they can and will get it wrong, and it'll be a pain in
>> the neck to debug.
>
> We don't actually have to do that.  Run gtk-demo under xscope, click
> the resize-grippy in the window a few times, then grep the log for
> "EVENT: Button".  Only button presses are delivered to gtk+ and it

Set GDK_CORE_DEVICE_EVENTS=1 to avoid confusing xscope with Xi2 events, btw.

Kristian


More information about the wayland-devel mailing list