aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeoff Greer <geoff@greer.fm>2019-02-10 16:56:57 -0800
committeremersion <contact@emersion.fr>2019-03-24 09:37:24 +0200
commit6e3046878d4dced3f2e503973ad31d7921c0c400 (patch)
tree6a8b5b2204624848edb0b37ecfad8c7764bd2633 /include
parent200833caaea36dd65324e5460520731f5c98ff8a (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 'include')
-rw-r--r--include/sway/commands.h1
-rw-r--r--include/sway/config.h1
-rw-r--r--include/sway/output.h1
-rw-r--r--include/util.h3
4 files changed, 6 insertions, 0 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index 1c147c5a..7533a14d 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -261,6 +261,7 @@ sway_cmd output_cmd_enable;
sway_cmd output_cmd_mode;
sway_cmd output_cmd_position;
sway_cmd output_cmd_scale;
+sway_cmd output_cmd_subpixel;
sway_cmd output_cmd_transform;
sway_cmd seat_cmd_attach;
diff --git a/include/sway/config.h b/include/sway/config.h
index 8970696c..d49120a0 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -184,6 +184,7 @@ struct output_config {
int x, y;
float scale;
int32_t transform;
+ enum wl_output_subpixel subpixel;
char *background;
char *background_option;
diff --git a/include/sway/output.h b/include/sway/output.h
index 8015f211..c336c559 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -31,6 +31,7 @@ struct sway_output {
int lx, ly; // layout coords
int width, height; // transformed buffer size
+ enum wl_output_subpixel detected_subpixel;
bool enabled, configured;
list_t *workspaces;
diff --git a/include/util.h b/include/util.h
index 1fd772c0..6a668fd6 100644
--- a/include/util.h
+++ b/include/util.h
@@ -3,6 +3,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include <wayland-server-protocol.h>
/**
* Wrap i into the range [0, max[
@@ -29,4 +30,6 @@ bool parse_boolean(const char *boolean, bool current);
*/
float parse_float(const char *value);
+const char *sway_wl_output_subpixel_to_string(enum wl_output_subpixel subpixel);
+
#endif