<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Document how serial should work"
href="https://bugs.freedesktop.org/show_bug.cgi?id=83488#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Document how serial should work"
href="https://bugs.freedesktop.org/show_bug.cgi?id=83488">bug 83488</a>
from <span class="vcard"><a class="email" href="mailto:mchqwerty@gmail.com" title="Marek Chalupa <mchqwerty@gmail.com>"> <span class="fn">Marek Chalupa</span></a>
</span></b>
<pre>Hi,
I noticed this bug few days ago. Before I read this I sent a patch for bumping
serials in disply_sync. After reading this, I got unsure whether the patch is
correct.. but, yes, I think we should use different serial for each callback.
Problem is that it could break things.
<span class="quote">> < pq> one of the presumably latest additions is xdg_send_configure(), which
> wants to use a totally unrelated serial to match configure to ack_configure
>
> < daniels> ugh, yes
>
> < daniels> that's the main one i can see which is objectively broken
>
> < pq> we only have one serial source counter in wl_display, so I think we
> should be wl_display_get_serial()'ing a lot less than we do now
>
> < daniels> that really needs to be in a separate namespace
>
> < pq> well, wouldn't we need one serial generator per wl_seat?
>
> < pq> I mean namespace
>
> < daniels> bumping serial on focus change is definitely broken too, though i
> guess probably inadvertently gets us the behaviour we want :P
>
> < daniels> i.e. if you click on the titlebar of an unfocused window, you
> don't want to start a move
>
> < daniels> so it might be that clients are trying to start moves with the
> button-down serial, which then gets rejected because focus is newer :P
>
> < daniels> namespace/generator no, comparator yes
>
> < daniels> i.e. store last_serial in wl_seat rather than wl_display, and use
> that to compare against
>
> < pq> <a href="http://pastie.org/pastes/9526493/text">http://pastie.org/pastes/9526493/text</a> for get_serial usage
>
> < daniels> keymap bumping serial is a little questionable too, but trying to
> relate events across keymap changes is ... ugh
>
> < pq> daniels, serials are already stored separately to be compared against,
> but the serials sent to clients are retrieved from wl_display, which may
> have advanced for unrelated reasons
>
> < daniels> hmmm, yes
>
> < daniels> right, so get_serial should also be retrieving from wl_seat where
> it relates to that</span >
What about adding serial counter into wl_resource and relevant objects could
have get_serial/next_serial for this (i.e. wl_keyboard_get/next_serial etc.)?
If the serial would be specific to each object then AFAIK it wouldn't break
anything in the current code. Actually, that is what I expect from the serials.
When I get a pointer event with a serial, say A, and then get another pointer
event with some other serial, say B, I would expect that the B serial is
related only to A serial and is not affected by any other object.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>