On 10/15/2014 01:16 AM, Marek Chalupa wrote:
+ shadow_height = height / 2;
+
+ /* when the height is odd, we need some part of the
+ * shadow to be one pixel higher. Let's choose the
+ * upper one */
+ if (height % 2 != 0 && !fy)
+ ++shadow_height;
This does the same thing:
shadow_height = (height + (fy ? 0 : 1)) / 2;
If there is any chance height is negative you want to use >>1 rather
than /2. This is because it always rounds in the same direction (down
rather than toward zero). I don't think negative height happens here,
however.
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel