diff options
| author | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-10-03 23:28:58 -0500 | 
|---|---|---|
| committer | Leonardo Hernández Hernández <leohdz172@protonmail.com> | 2022-10-03 23:28:58 -0500 | 
| commit | 8559141b30bfa9acdad4c2385b712b5ee51e1794 (patch) | |
| tree | 7c97dacf90a91f0d60cb9780e38accb4e74d247f /dwl.c | |
| parent | b8bc54b65d7dfaf1c7aa92de32f8ca37d8e011f9 (diff) | |
avoid usage of goto
Based on this suggestion: https://github.com/guyuming76/dwl/commit/bc72af6e2430cfb8db2f5fa1b9800c86f445b6d6#commitcomment-85592855
Diffstat (limited to '')
| -rw-r--r-- | dwl.c | 12 | 
1 files changed, 5 insertions, 7 deletions
| @@ -2388,14 +2388,12 @@ unmapnotify(struct wl_listener *listener, void *data)  	if (c->mon)  		c->mon->un_map = 1; -	if (client_is_unmanaged(c)) -		goto end; - -	wl_list_remove(&c->link); -	setmon(c, NULL, 0); -	wl_list_remove(&c->flink); +	if (!client_is_unmanaged(c)) { +		wl_list_remove(&c->link); +		setmon(c, NULL, 0); +		wl_list_remove(&c->flink); +	} -end:  	wl_list_remove(&c->commit.link);  	wlr_scene_node_destroy(c->scene);  	printstatus(); | 
