aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rio/color.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-03-29 12:00:15 +0000
committerrsc <devnull@localhost>2004-03-29 12:00:15 +0000
commit1cb3fa80938299775382766b4b754e6220bf9831 (patch)
treebb33cdf36f2b18c2708286938a56f61569b5e1a6 /src/cmd/rio/color.c
parentd99b2f34e69bc363c2973a2473e75654196ab40e (diff)
downloadplan9port-1cb3fa80938299775382766b4b754e6220bf9831.tar.gz
plan9port-1cb3fa80938299775382766b4b754e6220bf9831.tar.bz2
plan9port-1cb3fa80938299775382766b4b754e6220bf9831.zip
Border resizing by dragging.
Thanks to Axel Belinfante.
Diffstat (limited to 'src/cmd/rio/color.c')
-rw-r--r--src/cmd/rio/color.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cmd/rio/color.c b/src/cmd/rio/color.c
index 0e3c8d89..e3410bba 100644
--- a/src/cmd/rio/color.c
+++ b/src/cmd/rio/color.c
@@ -8,7 +8,7 @@
#include "fns.h"
unsigned long
-colorpixel(Display *dpy, int depth, unsigned long rgb)
+colorpixel(Display *dpy, int depth, unsigned long rgb, unsigned long def)
{
int r, g, b;
@@ -23,9 +23,7 @@ colorpixel(Display *dpy, int depth, unsigned long rgb)
case 8:
default:
/* not going to waste color map entries */
- if(rgb == 0xFFFFFF)
- return WhitePixel(dpy, DefaultScreen(dpy));
- return BlackPixel(dpy, DefaultScreen(dpy));
+ return def;
case 15:
r >>= 3;
g >>= 3;