scene: avoid redundant wl_surface.enter/leave events

Currently we send wl_surface.enter/leave when a surface is hidden
and shown again on the same output. In practice, this happens very
often since compositors like river and sway enable and disable
the scene nodes of surfaces as part of their atomic transaction
strategy involving rendering saved buffers while waiting for
clients to submit new buffers of the desired size.

The new strategy documented in the new comments avoids sending
redundant events in this case.
This commit is contained in:
Isaac Freund 2026-03-13 17:43:52 +01:00
parent 736c0f3f25
commit 39e918edc8
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11
2 changed files with 31 additions and 29 deletions

View file

@ -131,8 +131,6 @@ struct wlr_scene_surface {
struct wlr_addon addon;
struct wl_listener outputs_update;
struct wl_listener output_enter;
struct wl_listener output_leave;
struct wl_listener output_sample;
struct wl_listener frame_done;
struct wl_listener surface_destroy;