summaryrefslogtreecommitdiff
path: root/Xbit.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-05-13 01:01:08 +0000
committerIan C <ianc@noddybox.co.uk>2005-05-13 01:01:08 +0000
commit68bdfbc595d36ad2423860423c7018f0e1699d95 (patch)
tree6365f0443cfbf48e968e24eea6cf87d6789f4169 /Xbit.c
parentfb7306526f0d6e2fe58c12ec7daad098f97b709f (diff)
Removed overuse of DefaultDepth
Diffstat (limited to 'Xbit.c')
-rw-r--r--Xbit.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/Xbit.c b/Xbit.c
index b4907fa..ef38c06 100644
--- a/Xbit.c
+++ b/Xbit.c
@@ -333,6 +333,12 @@ void SetCurrentWin(Window w)
}
+int GetVisualDepth(void)
+{
+ return vinfo.depth;
+}
+
+
Window OpenWin (int argc,
char **argv,
char *title,
@@ -583,7 +589,7 @@ Pixmap GetBitmap(const char *fn, int *w, int *h, int *hx, int *hy)
return(0);
}
- ret=XCreatePixmap(display,current->w,*w,*h,DefaultDepth(display,0));
+ ret=XCreatePixmap(display,current->w,*w,*h,vinfo.depth);
XCopyPlane(display,bm,ret,current->gc,0,0,*w,*h,0,0,1L);
@@ -638,8 +644,7 @@ void Resize(int w,int h)
for(f=0;f<current->multino;f++)
{
XFreePixmap(display,current->pm[f]);
- current->pm[f]=XCreatePixmap(display,current->w,w,h,
- DefaultDepth(display,0));
+ current->pm[f]=XCreatePixmap(display,current->w,w,h,vinfo.depth);
XFillRectangle(display,current->pm[f],
current->gc,0,0,current->pw,current->ph);
}
@@ -657,12 +662,10 @@ void Resize(int w,int h)
current->pmi=0;
- current->pm[0]=XCreatePixmap(display,current->w,w,h,
- DefaultDepth(display,0));
+ current->pm[0]=XCreatePixmap(display,current->w,w,h,vinfo.depth);
if (current->buffer)
- current->pm[1]=XCreatePixmap(display,current->w,w,h,
- DefaultDepth(display,0));
+ current->pm[1]=XCreatePixmap(display,current->w,w,h,vinfo.depth);
}
@@ -778,7 +781,7 @@ void EnableBuffers(int no, ulong clscol)
for(f=0;f<current->multino;f++)
{
current->pm[f]=XCreatePixmap(display,current->w,current->ww,current->wh,
- DefaultDepth(display,0));
+ vinfo.depth);
XFillRectangle(display,current->pm[f],
current->gc,0,0,current->pw,current->ph);
}