summaryrefslogtreecommitdiff
path: root/src/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/view.c')
-rw-r--r--src/view.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/view.c b/src/view.c
index 029bf33..20b7475 100644
--- a/src/view.c
+++ b/src/view.c
@@ -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)