From e127c29d10096e207a65518ef30f411ef3a3b3e7 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Mon, 18 Sep 2023 11:53:28 +0300 Subject: [PATCH] protocol: change wl_surface.enter/leave wording The existing wording has been carried from the introduction of the enter and leave events in commit a5df3de101f88f16aa8c3325825501a47525d7d3 Date: Tue Apr 17 17:22:45 2012 -0400 Add wl_surface.enter and wl_surface.leave events However, the modern understanding is that a surface cannot enter an output unless it would actually be shown there, at least if no other surfaces existed in the compositor. For a surface to be shown, it must mapped, and it cannot be mapped without contents and a role. A wl_surface is created without contents and without a role, so simply creating a wl_surface cannot result in enter events. The enter and leave events have traditionally been used to infer the output scale and tranform that would be best for the client to use. This is indirect, somewhat vague, and does not work for a surface's initial drawing, which is why the wl_surface events preferred_buffer_scale and preferred_buffer_transform were introduced. This removes any remaining doubt that enter could be triggered simply by creating a wl_surface. Therefore, let's fix the wording here. Signed-off-by: Pekka Paalanen --- protocol/wayland.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 5efe562d..56991f6f 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -1662,7 +1662,7 @@ - This is emitted whenever a surface's creation, movement, or resizing + This is emitted whenever a surface's mapping, movement, or resizing results in some part of it being within the scanout region of an output. @@ -1673,7 +1673,7 @@ - This is emitted whenever a surface's creation, movement, or resizing + This is emitted whenever a surface's unmapping, movement, or resizing results in it no longer having any part of it within the scanout region of an output.