From e40d924b127a880ef799564ebaa7329c11a2015f Mon Sep 17 00:00:00 2001 From: rbuj Date: Mon, 10 Aug 2020 22:18:03 +0200 Subject: compositor-xrender: Use USHRT_MAX macro from limits.h --- src/compositor/compositor-xrender.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c index c90cdd4a..37440a79 100644 --- a/src/compositor/compositor-xrender.c +++ b/src/compositor/compositor-xrender.c @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -833,10 +834,10 @@ solid_picture (MetaDisplay *display, return None; } - c.alpha = (unsigned short)(a * 0xffff); - c.red = (unsigned short)(r * 0xffff); - c.green = (unsigned short)(g * 0xffff); - c.blue = (unsigned short)(b * 0xffff); + c.alpha = (unsigned short)(a * USHRT_MAX); + c.red = (unsigned short)(r * USHRT_MAX); + c.green = (unsigned short)(g * USHRT_MAX); + c.blue = (unsigned short)(b * USHRT_MAX); XRenderFillRectangle (xdisplay, PictOpSrc, picture, &c, 0, 0, 1, 1); XFreePixmap (xdisplay, pixmap); @@ -912,7 +913,7 @@ root_tile (MetaScreen *screen) c.red = 0x0000; c.green = 0x0000; c.blue = 0x0000; - c.alpha = 0xffff; + c.alpha = USHRT_MAX; XRenderFillRectangle (xdisplay, PictOpSrc, picture, &c, 0, 0, 1, 1); XFreePixmap (xdisplay, pixmap); -- cgit v1.2.1