diff options
Diffstat (limited to 'sway/border.c')
-rw-r--r-- | sway/border.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/border.c b/sway/border.c index 8c9106e4..872e8d34 100644 --- a/sway/border.c +++ b/sway/border.c | |||
@@ -10,13 +10,13 @@ | |||
10 | 10 | ||
11 | void cairo_set_source_u32(cairo_t *cairo, uint32_t color) { | 11 | void cairo_set_source_u32(cairo_t *cairo, uint32_t color) { |
12 | int endian = 1; | 12 | int endian = 1; |
13 | if (*(char *)&endian == 1) { | 13 | if (*(char *)&endian == 1) { // little endian |
14 | cairo_set_source_rgba(cairo, | 14 | cairo_set_source_rgba(cairo, |
15 | (color >> (1*8) & 0xFF) / 255.0, | 15 | (color >> (1*8) & 0xFF) / 255.0, |
16 | (color >> (2*8) & 0xFF) / 255.0, | 16 | (color >> (2*8) & 0xFF) / 255.0, |
17 | (color >> (3*8) & 0xFF) / 255.0, | 17 | (color >> (3*8) & 0xFF) / 255.0, |
18 | (color >> (0*8) & 0xFF) / 255.0); | 18 | (color >> (0*8) & 0xFF) / 255.0); |
19 | } else { | 19 | } else { // big endian |
20 | cairo_set_source_rgba(cairo, | 20 | cairo_set_source_rgba(cairo, |
21 | (color >> (0*8) & 0xFF) / 255.0, | 21 | (color >> (0*8) & 0xFF) / 255.0, |
22 | (color >> (3*8) & 0xFF) / 255.0, | 22 | (color >> (3*8) & 0xFF) / 255.0, |