projects
/
dana
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
044c8ae
)
more efficient/nicer way to get the XColor values
author
Dana Jansens
<danakj@orodu.net>
Wed, 12 Feb 2003 01:22:31 +0000
(
01:22
+0000)
committer
Dana Jansens
<danakj@orodu.net>
Wed, 12 Feb 2003 01:22:31 +0000
(
01:22
+0000)
otk/rendercolor.cc
patch
|
blob
|
history
diff --git
a/otk/rendercolor.cc
b/otk/rendercolor.cc
index 5917b00732bba72a70ebb08c10946c3deaad1fba..31823341c7e61bfae81851544ceca1eef2a59c43 100644
(file)
--- a/
otk/rendercolor.cc
+++ b/
otk/rendercolor.cc
@@
-61,9
+61,9
@@
void RenderColor::create()
const ScreenInfo *info = display->screenInfo(_screen);
XColor xcol; // convert from 0-0xff to 0-0xffff
- xcol.red = _red
; xcol.red |= xcol.red << 8
;
- xcol.green = _green
; xcol.green |= xcol.green << 8
;
- xcol.blue = _blue
; xcol.blue |= xcol.blue << 8
;
+ xcol.red = _red
<< 8 | _red
;
+ xcol.green = _green
<< 8 | _green
;
+ xcol.blue = _blue
<< 8 | _blue
;
xcol.pixel = 0;
if (! XAllocColor(**display, info->colormap(), &xcol)) {