diff options
author | Yuval Fledel <yuvalfl@gmail.com> | 2010-11-22 21:34:19 +0200 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-11-22 15:19:43 -0500 |
commit | e9f5e36730e8dfc703e90b1382ffd0dac6310a99 (patch) | |
tree | 8e9a07e8f33b3257b04592a69f63e3be19d48ce8 /clients | |
parent | 91b5999ce4a72aadec0aef42121045ff78e1f0df (diff) | |
download | weston-e9f5e36730e8dfc703e90b1382ffd0dac6310a99.tar.gz weston-e9f5e36730e8dfc703e90b1382ffd0dac6310a99.tar.bz2 weston-e9f5e36730e8dfc703e90b1382ffd0dac6310a99.zip |
Make clients exit orderly when there is no connection
Diffstat (limited to 'clients')
-rw-r--r-- | clients/dnd.c | 4 | ||||
-rw-r--r-- | clients/flower.c | 4 | ||||
-rw-r--r-- | clients/gears.c | 4 | ||||
-rw-r--r-- | clients/image.c | 4 | ||||
-rw-r--r-- | clients/smoke.c | 4 | ||||
-rw-r--r-- | clients/terminal.c | 4 | ||||
-rw-r--r-- | clients/view.c | 4 |
7 files changed, 28 insertions, 0 deletions
diff --git a/clients/dnd.c b/clients/dnd.c index 766fc5c5..dedf353a 100644 --- a/clients/dnd.c +++ b/clients/dnd.c @@ -581,6 +581,10 @@ main(int argc, char *argv[]) srandom(tv.tv_usec); d = display_create(&argc, &argv, option_entries); + if (d == NULL) { + fprintf(stderr, "failed to create display: %m\n"); + return -1; + } display_set_drag_offer_handler(d, drag_offer_handler); diff --git a/clients/flower.c b/clients/flower.c index 9054c0fd..b919cf5f 100644 --- a/clients/flower.c +++ b/clients/flower.c @@ -124,6 +124,10 @@ int main(int argc, char *argv[]) struct display *d; d = display_create(&argc, &argv, NULL); + if (d == NULL) { + fprintf(stderr, "failed to create display: %m\n"); + return -1; + } flower.x = 512; flower.y = 384; diff --git a/clients/gears.c b/clients/gears.c index 17536cb2..7d3c3100 100644 --- a/clients/gears.c +++ b/clients/gears.c @@ -413,6 +413,10 @@ int main(int argc, char *argv[]) struct gears *gears; d = display_create(&argc, &argv, NULL); + if (d == NULL) { + fprintf(stderr, "failed to create display: %m\n"); + return -1; + } gears = gears_create(d); display_run(d); diff --git a/clients/image.c b/clients/image.c index cf982663..8f30c4a4 100644 --- a/clients/image.c +++ b/clients/image.c @@ -244,6 +244,10 @@ main(int argc, char *argv[]) int i; d = display_create(&argc, &argv, option_entries); + if (d == NULL) { + fprintf(stderr, "failed to create display: %m\n"); + return -1; + } for (i = 1; i < argc; i++) { struct image *image; diff --git a/clients/smoke.c b/clients/smoke.c index 246e3476..43226adf 100644 --- a/clients/smoke.c +++ b/clients/smoke.c @@ -267,6 +267,10 @@ int main(int argc, char *argv[]) int size; d = display_create(&argc, &argv, NULL); + if (d == NULL) { + fprintf(stderr, "failed to create display: %m\n"); + return -1; + } smoke.x = 200; smoke.y = 200; diff --git a/clients/terminal.c b/clients/terminal.c index c841ef2c..2f12f8ae 100644 --- a/clients/terminal.c +++ b/clients/terminal.c @@ -548,6 +548,10 @@ int main(int argc, char *argv[]) struct terminal *terminal; d = display_create(&argc, &argv, option_entries); + if (d == NULL) { + fprintf(stderr, "failed to create display: %m\n"); + return -1; + } terminal = terminal_create(d, option_fullscreen); if (terminal_run(terminal, "/bin/bash")) diff --git a/clients/view.c b/clients/view.c index ace838dd..e6f18573 100644 --- a/clients/view.c +++ b/clients/view.c @@ -207,6 +207,10 @@ main(int argc, char *argv[]) int i; d = display_create(&argc, &argv, option_entries); + if (d == NULL) { + fprintf(stderr, "failed to create display: %m\n"); + return -1; + } for (i = 1; i < argc; i++) { struct view *view; |