aboutsummaryrefslogtreecommitdiff
path: root/swaylock
diff options
context:
space:
mode:
authorChristoph Gysin <christoph.gysin@gmail.com>2016-01-25 22:44:27 +0200
committerChristoph Gysin <christoph.gysin@gmail.com>2016-01-25 22:44:33 +0200
commita5345e807e229ee9e0e2f4bcb148aab0e7216e22 (patch)
tree7d7319859fdfa90ac7e6803b634f38a5418bb180 /swaylock
parentd2af1f33951220c2a9fc691034084d7276aafbc5 (diff)
extract cairo_set_source_u32()
Diffstat (limited to 'swaylock')
-rw-r--r--swaylock/main.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/swaylock/main.c b/swaylock/main.c
index 98e26839..f0fe1d00 100644
--- a/swaylock/main.c
+++ b/swaylock/main.c
@@ -115,14 +115,6 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod
}
}
-static void cairo_set_source_u32(cairo_t *cairo, uint32_t color) {
- cairo_set_source_rgba(cairo,
- (color >> (3*8) & 0xFF) / 255.0,
- (color >> (2*8) & 0xFF) / 255.0,
- (color >> (1*8) & 0xFF) / 255.0,
- (color >> (0*8) & 0xFF) / 255.0);
-}
-
void render_color(struct window *window, uint32_t color) {
cairo_set_source_u32(window->cairo, color);
cairo_paint(window->cairo);