diff options
author | 2020-05-28 03:36:38 -0400 | |
---|---|---|
committer | 2020-05-28 09:49:10 +0200 | |
commit | 6f7b548589feead7c3c3ae8d619f23770fd65fb0 (patch) | |
tree | 3ffbb663d571f9d881cab31cc6bc8363bbe01b79 /sway | |
parent | input/pointer: send pointer enter event on confine warp (diff) | |
download | sway-6f7b548589feead7c3c3ae8d619f23770fd65fb0.tar.gz sway-6f7b548589feead7c3c3ae8d619f23770fd65fb0.tar.zst sway-6f7b548589feead7c3c3ae8d619f23770fd65fb0.zip |
ipc: invert output transformation when necessary
After swaywm/wlroots#2023, #4996 inverted configuration transformations.
For consistency, we should undo (double-apply) the inversion when
communicating via IPC.
Closes #5356.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/ipc-json.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index 67f0eed7..c2e43f6e 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c | |||
@@ -68,19 +68,24 @@ static const char *ipc_json_output_transform_description(enum wl_output_transfor | |||
68 | case WL_OUTPUT_TRANSFORM_NORMAL: | 68 | case WL_OUTPUT_TRANSFORM_NORMAL: |
69 | return "normal"; | 69 | return "normal"; |
70 | case WL_OUTPUT_TRANSFORM_90: | 70 | case WL_OUTPUT_TRANSFORM_90: |
71 | return "90"; | 71 | // Sway uses clockwise transforms, while WL_OUTPUT_TRANSFORM_* describes |
72 | // anti-clockwise transforms. | ||
73 | return "270"; | ||
72 | case WL_OUTPUT_TRANSFORM_180: | 74 | case WL_OUTPUT_TRANSFORM_180: |
73 | return "180"; | 75 | return "180"; |
74 | case WL_OUTPUT_TRANSFORM_270: | 76 | case WL_OUTPUT_TRANSFORM_270: |
75 | return "270"; | 77 | // Transform also inverted here. |
78 | return "90"; | ||
76 | case WL_OUTPUT_TRANSFORM_FLIPPED: | 79 | case WL_OUTPUT_TRANSFORM_FLIPPED: |
77 | return "flipped"; | 80 | return "flipped"; |
78 | case WL_OUTPUT_TRANSFORM_FLIPPED_90: | 81 | case WL_OUTPUT_TRANSFORM_FLIPPED_90: |
79 | return "flipped-90"; | 82 | // Inverted. |
83 | return "flipped-270"; | ||
80 | case WL_OUTPUT_TRANSFORM_FLIPPED_180: | 84 | case WL_OUTPUT_TRANSFORM_FLIPPED_180: |
81 | return "flipped-180"; | 85 | return "flipped-180"; |
82 | case WL_OUTPUT_TRANSFORM_FLIPPED_270: | 86 | case WL_OUTPUT_TRANSFORM_FLIPPED_270: |
83 | return "flipped-270"; | 87 | // Inverted. |
88 | return "flipped-90"; | ||
84 | } | 89 | } |
85 | return NULL; | 90 | return NULL; |
86 | } | 91 | } |