diff options
author | Geoff Greer <geoff@greer.fm> | 2019-02-10 16:56:57 -0800 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-03-24 09:37:24 +0200 |
commit | 6e3046878d4dced3f2e503973ad31d7921c0c400 (patch) | |
tree | 6a8b5b2204624848edb0b37ecfad8c7764bd2633 /swaymsg/main.c | |
parent | Allow for workspace renaming during exec handling (diff) | |
download | sway-6e3046878d4dced3f2e503973ad31d7921c0c400.tar.gz sway-6e3046878d4dced3f2e503973ad31d7921c0c400.tar.zst sway-6e3046878d4dced3f2e503973ad31d7921c0c400.zip |
Add support for manually setting subpixel hinting on outputs.
Many laptop screens report unknown subpixel order. Allow users to manually set subpixel hinting to work around this.
Addresses https://github.com/swaywm/sway/issues/3163
Diffstat (limited to 'swaymsg/main.c')
-rw-r--r-- | swaymsg/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c index 65cc4bbb..f86000a4 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c | |||
@@ -186,11 +186,12 @@ static void pretty_print_output(json_object *o) { | |||
186 | json_object_object_get_ex(o, "focused", &focused); | 186 | json_object_object_get_ex(o, "focused", &focused); |
187 | json_object_object_get_ex(o, "active", &active); | 187 | json_object_object_get_ex(o, "active", &active); |
188 | json_object_object_get_ex(o, "current_workspace", &ws); | 188 | json_object_object_get_ex(o, "current_workspace", &ws); |
189 | json_object *make, *model, *serial, *scale, *transform; | 189 | json_object *make, *model, *serial, *scale, *subpixel, *transform; |
190 | json_object_object_get_ex(o, "make", &make); | 190 | json_object_object_get_ex(o, "make", &make); |
191 | json_object_object_get_ex(o, "model", &model); | 191 | json_object_object_get_ex(o, "model", &model); |
192 | json_object_object_get_ex(o, "serial", &serial); | 192 | json_object_object_get_ex(o, "serial", &serial); |
193 | json_object_object_get_ex(o, "scale", &scale); | 193 | json_object_object_get_ex(o, "scale", &scale); |
194 | json_object_object_get_ex(o, "subpixel_hinting", &subpixel); | ||
194 | json_object_object_get_ex(o, "transform", &transform); | 195 | json_object_object_get_ex(o, "transform", &transform); |
195 | json_object *x, *y; | 196 | json_object *x, *y; |
196 | json_object_object_get_ex(rect, "x", &x); | 197 | json_object_object_get_ex(rect, "x", &x); |
@@ -209,6 +210,7 @@ static void pretty_print_output(json_object *o) { | |||
209 | " Current mode: %dx%d @ %f Hz\n" | 210 | " Current mode: %dx%d @ %f Hz\n" |
210 | " Position: %d,%d\n" | 211 | " Position: %d,%d\n" |
211 | " Scale factor: %f\n" | 212 | " Scale factor: %f\n" |
213 | " Subpixel hinting: %s\n" | ||
212 | " Transform: %s\n" | 214 | " Transform: %s\n" |
213 | " Workspace: %s\n", | 215 | " Workspace: %s\n", |
214 | json_object_get_string(name), | 216 | json_object_get_string(name), |
@@ -221,6 +223,7 @@ static void pretty_print_output(json_object *o) { | |||
221 | (float)json_object_get_int(refresh) / 1000, | 223 | (float)json_object_get_int(refresh) / 1000, |
222 | json_object_get_int(x), json_object_get_int(y), | 224 | json_object_get_int(x), json_object_get_int(y), |
223 | json_object_get_double(scale), | 225 | json_object_get_double(scale), |
226 | json_object_get_string(subpixel), | ||
224 | json_object_get_string(transform), | 227 | json_object_get_string(transform), |
225 | json_object_get_string(ws) | 228 | json_object_get_string(ws) |
226 | ); | 229 | ); |