[RFC weston] clients: Don't attach a buffer if mouse cursor surface is unchanged
daniel at fooishbar.org
Sun Jul 22 10:55:24 UTC 2018
On Thu, 22 Feb 2018 at 22:16, Derek Foreman <derekf at osg.samsung.com> wrote:
> Keep track of what cusor image buffer is attached to the cursor
> surface and avoid re-attaching it if we don't have to.
> This isn't just an obviously pointless optimization, it turns all
> of toy toolkit into a test case for handling this properly.
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> Continuing my streak of posting unpopular patches, this patch breaks
> weston, so I'm not pushing for inclusion, but I think we need to
> resolve why it breaks, and fix either weston or wayland documentation
> to reflect expected behaviour.
> I think this can be attributed to a weston bug, and we should be able to
> expect that the compositor will be able to redisplay the surface without
> needing to attach a new buffer, and that if the compositor has released
> the buffer then it has a kept copy somewhere...
> Any other opinions?
Hmm, I'm really not sure what to think about this.
I take it the problem is that the client sets a particular surface as
the pointer surface, loses focus, sets the same surface as the pointer
surface on re-enter after not changing the content, and then the
content is never shown?
If so, the two solutions would be:
- the surface content should be preserved across leave/enter; Weston
is buggy for not showing the content on re-enter
- mouse leave and your surface no longer being shown as a pointer
surface causes the surface to lose that role; Wayland protocol spec
should explicitly state this
I have a very slight lean towards the latter because it more closely
matches my recollection of what the XDG roles do. But that
recollection might be totally wrong, who knows.
More information about the wayland-devel