diff options
Diffstat (limited to 'src/view.c')
-rw-r--r-- | src/view.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -75,9 +75,10 @@ view_lookup(struct client *c, int viewid) { struct view *v; - TAILQ_FOREACH(v, &c->views, client_next) - if (v->id == viewid) - return v; + if (viewid != 0) + TAILQ_FOREACH(v, &c->views, client_next) + if (v->id == viewid) + return v; return NULL; @@ -184,6 +185,8 @@ view_new(struct client *c, struct buffer *b, int id, unsigned int flags) if (c->num_views >= c->max_views) return NULL; + if (flags == VIEW_FLAGS_CLIENT && id == 0) + return NULL; /* create subsurface */ if (b->bsurface->GetSubSurface(b->bsurface, NULL, &vsurf) != DFB_OK) |