aboutsummaryrefslogtreecommitdiff
path: root/swaymsg
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2019-02-10 16:56:57 -0800
committerFurkan Sahin <furkan-dev@proton.me>2019-02-10 16:56:57 -0800
commit5fffb7cf80becae6c6475b1d5d350f46de51aafd (patch)
tree6a8b5b2204624848edb0b37ecfad8c7764bd2633 /swaymsg
parent6545281d99449ef186880498a1bbfdcf4517e219 (diff)
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')
-rw-r--r--swaymsg/main.c5
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) {
json_object_object_get_ex(o, "focused", &focused);
json_object_object_get_ex(o, "active", &active);
json_object_object_get_ex(o, "current_workspace", &ws);
- json_object *make, *model, *serial, *scale, *transform;
+ json_object *make, *model, *serial, *scale, *subpixel, *transform;
json_object_object_get_ex(o, "make", &make);
json_object_object_get_ex(o, "model", &model);
json_object_object_get_ex(o, "serial", &serial);
json_object_object_get_ex(o, "scale", &scale);
+ json_object_object_get_ex(o, "subpixel_hinting", &subpixel);
json_object_object_get_ex(o, "transform", &transform);
json_object *x, *y;
json_object_object_get_ex(rect, "x", &x);
@@ -209,6 +210,7 @@ static void pretty_print_output(json_object *o) {
" Current mode: %dx%d @ %f Hz\n"
" Position: %d,%d\n"
" Scale factor: %f\n"
+ " Subpixel hinting: %s\n"
" Transform: %s\n"
" Workspace: %s\n",
json_object_get_string(name),
@@ -221,6 +223,7 @@ static void pretty_print_output(json_object *o) {
(float)json_object_get_int(refresh) / 1000,
json_object_get_int(x), json_object_get_int(y),
json_object_get_double(scale),
+ json_object_get_string(subpixel),
json_object_get_string(transform),
json_object_get_string(ws)
);