wl_surface.leave event not emitted properly
The wl_surface.leave event is not emitted in the following scenario:
- Run
weston --output-count=2
nested under X11 (haven't checked with other setups). - Run
WESTON_DEBUG=1 weston-terminal 2>&1 | egrep 'surface.*(enter|leave)'
. - Start moving the weston-terminal surface into
screen1
, we get a proper enter event forscreen1
. - Move the surface completely into
screen1
, observe that no leave event is emitted forscreen0
.
Example annotated output:
# Surface is created on first output wl_output@13
[2544008.353] wl_surface@16.enter(wl_output@13)
# We start moving surface into second output wl_output@14
[2545425.727] wl_surface@16.enter(wl_output@14)
# Moved surface fully into second output, no leave event for first output!!!
# Moved surface fully back into first output, we get leave event for second output.
[2554513.085] wl_surface@16.leave(wl_output@14)
This is reproducible in both weston 10.0.1 (debian testing) and latest upstream (8f1ca820).
From a very brief investigation into weston internals there seems to be some rogue(?) weston_view
for the surface that keeps the first output in its output_mask
.
Edited by Alexandros Frantzis