summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-02-01 09:53:08 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-02-01 09:53:08 +0100
commitd77455ab2ddfbb74917f98a3344c47403b0461e8 (patch)
treeab3d8650bf35b9690c4bc23a138969997fe5e70a
parent010af9ba12213ccaf92a1d863dc1c971185ff7fb (diff)
downloadplan9front-d77455ab2ddfbb74917f98a3344c47403b0461e8.tar.xz
libdraw: use pid as initial screenid so one can have more than 25 windows.
-rw-r--r--sys/src/libdraw/window.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/libdraw/window.c b/sys/src/libdraw/window.c
index 84ecb1fc9..83806535a 100644
--- a/sys/src/libdraw/window.c
+++ b/sys/src/libdraw/window.c
@@ -22,6 +22,8 @@ allocscreen(Image *image, Image *fill, int public)
s = malloc(sizeof(Screen));
if(s == 0)
return 0;
+ if(!screenid)
+ screenid = getpid();
for(try=0; try<25; try++){
/* loop until find a free id */
a = bufimage(d, 1+4+4+4+1);