Conversation
clients might re-create layer shell surfaces when receiving a close event. give them a chance to detect that the output has been removed by disabling the global before sending the close event.
There was a problem hiding this comment.
I think in this function it doesn't matter where the code is because it's a synchronous function. We don't send or receive anything from clients within this function. So I'd rather leave the code where it was
There was a problem hiding this comment.
Both, disable global and layersurface send_close will send events to clients. This commit does change the order. I am not convinced this is necessary, but it seems to prevent some qs ghost Windows. I have to check, but my theory is like stated in the commit message.
There was a problem hiding this comment.
Ah, right, they aren't sent but they are buffered to be sent in the ordered Wayland message buffer.
There was a problem hiding this comment.
Yes, technically they are buffered and not directly sent here.
My theory is based on the fact that without sending the output destroy before the close the client can not tell the difference.
layer shell close defines:
The closed event is sent by the compositor when the surface will no longer be shown. The output may have been destroyed or the user may have asked for it to be removed. Further changes to the surface will be ignored. The client should destroy the resource after receiving this event, and create a new surface if they so choose.
I can't tell if it intentionally uses the past tense for output destroy, but it would make sense.
|
@YaLTeR I have some idea on what happens. While neither smithay nor niri intentionally send a nil for output in surface.enter the client might still see a nil value if it has destroyed the proxy client side. wayland-client tracks destroyed proxies and will replace destroyed resources with a null value when processing event arguments. |
this is more a workaround as the output should be destroyed at this point. it looks like someone might be keeping the output alive.
a14d89d to
3c38efe
Compare
|
@YaLTeR finding a solution for preventing sending disabled global instances in event arguments will take some time. |
|
Yeah, sure, makes sense |
No description provided.