wlr_* structs should be free'd when the wl_resource is
Rationale: it shouldn't be possible to destroy a wlr_* struct without destroying its resource.
Right now, we generally have a wlr_thing_destroy
that destroys the wlr_thing
without destroying the resource. Then, we have a wl_resource
destroy handler which calls wlr_thing_destroy
. This is an issue since calling wlr_thing_destroy
won't free the resource (ie. leak memory, and more importantly allow the client to send requests to it and make the compositor crash).
We can't call wl_resource_destroy
from wlr_thing_destroy
because we can't call wl_resource_destroy
from the resource destroy handler. We also still want to destroy the wlr_thing
if the client disconnects.
So instead we should make wlr_thing_destroy
just call wl_resource_destroy
(if we want to keep this function at all), and the resource destroy handler do the actual cleaning.
TODO:
-
Core Wayland protocol -
gamma control -
idle inhibit -
idle -
input inhibitor -
layer shell -
linux dmabuf -
primary selection -
screenshooterwill be replaced -
server decorationwill be replaced -
xdg output -
zxdg-shell v6, xdg-shell stable