~emersion/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH wlr-randr] Destroy head and mode objects before disconnect

Details
Message ID
<20230304191035.5327-1-mail@isaacfreund.com>
DKIM signature
missing
Download raw message
Patch: +8 -1
The latest version of libwayland now prints warnings if we don't destroy
these.

warning: queue 0x56103a63e390 destroyed while proxies still attached:
  zwlr_output_mode_v1@4278190123 still attached
  zwlr_output_mode_v1@4278190122 still attached
  ...
---
 main.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/main.c b/main.c
index 82c8466..33a1656 100644
--- a/main.c
+++ b/main.c
@@ -754,7 +754,14 @@ int main(int argc, char *argv[]) {
		// This space intentionally left blank
	}

	// TODO: destroy heads
	struct randr_head *head, *tmp_head;
	wl_list_for_each_safe(head, tmp_head, &state.heads, link) {
	    struct randr_mode *mode, *tmp_mode;
	    wl_list_for_each_safe(mode, tmp_mode, &head->modes, link) {
            zwlr_output_mode_v1_destroy(mode->wlr_mode);
	    }
	    zwlr_output_head_v1_destroy(head->wlr_head);
	}
	zwlr_output_manager_v1_destroy(state.output_manager);
	wl_registry_destroy(registry);
	wl_display_disconnect(display);
-- 
2.39.1
Details
Message ID
<96iLCoT8sTBXOzFkyZijNjvN2Y0SC3_V9PMwehkN2rztP2ryy-WVbP77JJDhhP4XLRDMmm8JmZm2T2gv1OxgOSOzC2psZ0u5KQtcIjgIB80=@emersion.fr>
In-Reply-To
<20230304191035.5327-1-mail@isaacfreund.com> (view parent)
DKIM signature
missing
Download raw message
Pushed with a few changes:

- s/spaces/tabs/ for indentation
- Free the strings and structs as well

Thanks!
Reply to thread Export thread (mbox)