diff options
Diffstat (limited to 'clients')
-rw-r--r-- | clients/cliptest.c | 13 | ||||
-rw-r--r-- | clients/dnd.c | 11 | ||||
-rw-r--r-- | clients/editor.c | 3 | ||||
-rw-r--r-- | clients/flower.c | 4 | ||||
-rw-r--r-- | clients/fullscreen.c | 4 | ||||
-rw-r--r-- | clients/gears.c | 14 | ||||
-rw-r--r-- | clients/image.c | 2 | ||||
-rw-r--r-- | clients/scaler.c | 3 | ||||
-rw-r--r-- | clients/smoke.c | 4 | ||||
-rw-r--r-- | clients/stacking.c | 3 | ||||
-rw-r--r-- | clients/transformed.c | 3 |
11 files changed, 60 insertions, 4 deletions
diff --git a/clients/cliptest.c b/clients/cliptest.c index 3cee343f..a1928f40 100644 --- a/clients/cliptest.c +++ b/clients/cliptest.c @@ -879,6 +879,14 @@ benchmark(void) return 0; } +static void +cliptest_destroy(struct cliptest *cliptest) +{ + widget_destroy(cliptest->widget); + window_destroy(cliptest->window); + free(cliptest); +} + int main(int argc, char *argv[]) { @@ -897,9 +905,8 @@ main(int argc, char *argv[]) cliptest = cliptest_create(d); display_run(d); - widget_destroy(cliptest->widget); - window_destroy(cliptest->window); - free(cliptest); + cliptest_destroy(cliptest); + display_destroy(d); return 0; } diff --git a/clients/dnd.c b/clients/dnd.c index a463d6f6..620cfff2 100644 --- a/clients/dnd.c +++ b/clients/dnd.c @@ -639,6 +639,14 @@ dnd_create(struct display *display) return dnd; } +static void +dnd_destroy(struct dnd *dnd) +{ + widget_destroy(dnd->widget); + window_destroy(dnd->window); + free(dnd); +} + int main(int argc, char *argv[]) { @@ -660,5 +668,8 @@ main(int argc, char *argv[]) display_run(d); + dnd_destroy(dnd); + display_destroy(d); + return 0; } diff --git a/clients/editor.c b/clients/editor.c index f3f61419..08d12036 100644 --- a/clients/editor.c +++ b/clients/editor.c @@ -1382,6 +1382,9 @@ main(int argc, char *argv[]) text_entry_destroy(editor.entry); text_entry_destroy(editor.editor); + widget_destroy(editor.widget); + window_destroy(editor.window); + display_destroy(editor.display); return 0; } diff --git a/clients/flower.c b/clients/flower.c index 87694450..624525cd 100644 --- a/clients/flower.c +++ b/clients/flower.c @@ -195,5 +195,9 @@ int main(int argc, char *argv[]) display_run(d); + widget_destroy(flower.widget); + window_destroy(flower.window); + display_destroy(d); + return 0; } diff --git a/clients/fullscreen.c b/clients/fullscreen.c index 28efb155..5c5dd2bc 100644 --- a/clients/fullscreen.c +++ b/clients/fullscreen.c @@ -562,5 +562,9 @@ int main(int argc, char *argv[]) display_run(d); + widget_destroy(fullscreen.widget); + window_destroy(fullscreen.window); + display_destroy(d); + return 0; } diff --git a/clients/gears.c b/clients/gears.c index 93a86b4f..95f0bb21 100644 --- a/clients/gears.c +++ b/clients/gears.c @@ -469,17 +469,29 @@ gears_create(struct display *display) return gears; } +static void +gears_destroy(struct gears *gears) +{ + widget_destroy(gears->widget); + window_destroy(gears->window); + free(gears); +} + int main(int argc, char *argv[]) { struct display *d; + struct gears *gears; d = display_create(&argc, argv); if (d == NULL) { fprintf(stderr, "failed to create display: %m\n"); return -1; } - gears_create(d); + gears = gears_create(d); display_run(d); + gears_destroy(gears); + display_destroy(d); + return 0; } diff --git a/clients/image.c b/clients/image.c index 054979d9..112b93d9 100644 --- a/clients/image.c +++ b/clients/image.c @@ -424,5 +424,7 @@ main(int argc, char *argv[]) if (image_counter > 0) display_run(d); + display_destroy(d); + return 0; } diff --git a/clients/scaler.c b/clients/scaler.c index f94e714b..39390220 100644 --- a/clients/scaler.c +++ b/clients/scaler.c @@ -321,6 +321,9 @@ main(int argc, char *argv[]) display_run(d); + widget_destroy(box.widget); window_destroy(box.window); + display_destroy(d); + return 0; } diff --git a/clients/smoke.c b/clients/smoke.c index 5d976af1..65b6e038 100644 --- a/clients/smoke.c +++ b/clients/smoke.c @@ -329,5 +329,9 @@ int main(int argc, char *argv[]) display_run(d); + widget_destroy(smoke.widget); + window_destroy(smoke.window); + display_destroy(d); + return 0; } diff --git a/clients/stacking.c b/clients/stacking.c index abeded88..ea6101d5 100644 --- a/clients/stacking.c +++ b/clients/stacking.c @@ -304,5 +304,8 @@ main(int argc, char *argv[]) display_run(stacking.display); + window_destroy(stacking.root_window); + display_destroy(stacking.display); + return 0; } diff --git a/clients/transformed.c b/clients/transformed.c index 4b1cb056..880a0a96 100644 --- a/clients/transformed.c +++ b/clients/transformed.c @@ -290,6 +290,9 @@ int main(int argc, char *argv[]) transformed.width, transformed.height); display_run(d); + widget_destroy(transformed.widget); + window_destroy(transformed.window); + display_destroy(d); return 0; } |