summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGeoff Greer <geoff@greer.fm>2018-09-20 20:37:08 -0700
committerGeoff Greer <geoff@greer.fm>2018-09-22 11:34:21 -0700
commit1ba79a159e1808630dcd2541fee4772e525725ed (patch)
treeea60c905f560a7804dd8113f1b0451074400b04d /main.c
parent2376a9c5d788daa9894c7396bb2a6c41dfb5df26 (diff)
swaybar, swaylock, & tree/container: Set cairo font options to render text and lines with subpixel hinting (if available).
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.c b/main.c
index 668a874..c25c8ee 100644
--- a/main.c
+++ b/main.c
@@ -195,11 +195,15 @@ void damage_state(struct swaylock_state *state) {
}
}
-static void handle_wl_output_geometry(void *data, struct wl_output *output,
+static void handle_wl_output_geometry(void *data, struct wl_output *wl_output,
int32_t x, int32_t y, int32_t width_mm, int32_t height_mm,
int32_t subpixel, const char *make, const char *model,
int32_t transform) {
- // Who cares
+ struct swaylock_surface *surface = data;
+ surface->subpixel = subpixel;
+ if (surface->state->run_display) {
+ damage_surface(surface);
+ }
}
static void handle_wl_output_mode(void *data, struct wl_output *output,