summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2014-07-01 15:41:54 +0100
committerDaniel Stone <daniels@collabora.com>2014-07-01 15:41:54 +0100
commita2c3e554b4897b4e386dd4b9682af2f9117afb9b (patch)
treee7818867db4a035e49436ead07baed76684a16d3
parent14f4c750e8402f71940a717aaf8748eb4e8847c1 (diff)
downloadgraynard-a2c3e554b4897b4e386dd4b9682af2f9117afb9b.tar.gz
graynard-a2c3e554b4897b4e386dd4b9682af2f9117afb9b.zip
Don't loop forever if we can't find our interfaces
Just try one wl_display_roundtrip, rather than doing them in a tight loop until we fall off the face of the planet.
-rw-r--r--shell/maynard.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/shell/maynard.c b/shell/maynard.c
index a6c7e6d..85da0fc 100644
--- a/shell/maynard.c
+++ b/shell/maynard.c
@@ -638,8 +638,13 @@ main (int argc,
/* Wait until we have been notified about the compositor,
* shell, and shell helper objects */
- while (!desktop->output || !desktop->shell || !desktop->helper)
+ if (!desktop->output || !desktop->shell || !desktop->helper)
wl_display_roundtrip (desktop->display);
+ if (!desktop->output || !desktop->shell || !desktop->helper)
+ {
+ fprintf (stderr, "could not find output, shell or helper modules\n");
+ return -1;
+ }
desktop->grid_visible = FALSE;
desktop->system_visible = FALSE;