summaryrefslogtreecommitdiff
path: root/src/gtkutil.c
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2012-10-13 23:52:09 +0200
committerJan Djärv <jan.h.d@swipnet.se>2012-10-13 23:52:09 +0200
commit537f336d6228aa48d36c7749aff348569da0ab61 (patch)
tree1f3fb05c7cc22e0f007317ecdab951d5072b2b93 /src/gtkutil.c
parent3071811230cf9f6cd461a34cc7202565c4f9947a (diff)
* gtkutil.c (xg_set_widget_bg): Divide by 65535.
Fixes: debbugs:12612
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r--src/gtkutil.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 1bf2b533b4..4367b534cb 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1035,9 +1035,9 @@ xg_set_widget_bg (FRAME_PTR f, GtkWidget *w, long unsigned int pixel)
xbg.pixel = pixel;
if (XQueryColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), &xbg))
{
- bg.red = (double)xbg.red/65536.0;
- bg.green = (double)xbg.green/65536.0;
- bg.blue = (double)xbg.blue/65536.0;
+ bg.red = (double)xbg.red/65535.0;
+ bg.green = (double)xbg.green/65535.0;
+ bg.blue = (double)xbg.blue/65535.0;
bg.alpha = 1.0;
gtk_widget_override_background_color (w, GTK_STATE_FLAG_NORMAL, &bg);
}