diff options
author | 2018-11-03 23:44:04 +0100 | |
---|---|---|
committer | 2018-11-03 23:44:04 +0100 | |
commit | d19648a304dd7c6731ce53a7b7a265019f5b4473 (patch) | |
tree | 0396af53f1684e36469ea8a651281d3c1228f391 /swaymsg | |
parent | Merge pull request #3021 from Snaipe/singlekey-binding-trigger (diff) | |
parent | ipc: move refresh from output to output->current_mode (diff) | |
download | sway-d19648a304dd7c6731ce53a7b7a265019f5b4473.tar.gz sway-d19648a304dd7c6731ce53a7b7a265019f5b4473.tar.zst sway-d19648a304dd7c6731ce53a7b7a265019f5b4473.zip |
Merge pull request #3061 from colemickens/output-current-mode
ipc: move refresh to current_mode
Diffstat (limited to 'swaymsg')
-rw-r--r-- | swaymsg/main.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c index e13dd7ec..663518f6 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c | |||
@@ -163,28 +163,28 @@ static void pretty_print_seat(json_object *i) { | |||
163 | } | 163 | } |
164 | 164 | ||
165 | static void pretty_print_output(json_object *o) { | 165 | static void pretty_print_output(json_object *o) { |
166 | json_object *name, *rect, *focused, *active, *ws; | 166 | json_object *name, *rect, *focused, *active, *ws, *current_mode; |
167 | json_object_object_get_ex(o, "name", &name); | 167 | json_object_object_get_ex(o, "name", &name); |
168 | json_object_object_get_ex(o, "rect", &rect); | 168 | json_object_object_get_ex(o, "rect", &rect); |
169 | json_object_object_get_ex(o, "focused", &focused); | 169 | json_object_object_get_ex(o, "focused", &focused); |
170 | json_object_object_get_ex(o, "active", &active); | 170 | json_object_object_get_ex(o, "active", &active); |
171 | json_object_object_get_ex(o, "current_workspace", &ws); | 171 | json_object_object_get_ex(o, "current_workspace", &ws); |
172 | json_object *make, *model, *serial, *scale, *refresh, *transform; | 172 | json_object *make, *model, *serial, *scale, *transform; |
173 | json_object_object_get_ex(o, "make", &make); | 173 | json_object_object_get_ex(o, "make", &make); |
174 | json_object_object_get_ex(o, "model", &model); | 174 | json_object_object_get_ex(o, "model", &model); |
175 | json_object_object_get_ex(o, "serial", &serial); | 175 | json_object_object_get_ex(o, "serial", &serial); |
176 | json_object_object_get_ex(o, "scale", &scale); | 176 | json_object_object_get_ex(o, "scale", &scale); |
177 | json_object_object_get_ex(o, "refresh", &refresh); | ||
178 | json_object_object_get_ex(o, "transform", &transform); | 177 | json_object_object_get_ex(o, "transform", &transform); |
179 | json_object *x, *y, *width, *height; | 178 | json_object *x, *y; |
180 | json_object_object_get_ex(rect, "x", &x); | 179 | json_object_object_get_ex(rect, "x", &x); |
181 | json_object_object_get_ex(rect, "y", &y); | 180 | json_object_object_get_ex(rect, "y", &y); |
182 | json_object_object_get_ex(rect, "width", &width); | ||
183 | json_object_object_get_ex(rect, "height", &height); | ||
184 | json_object *modes; | 181 | json_object *modes; |
185 | json_object_object_get_ex(o, "modes", &modes); | 182 | json_object_object_get_ex(o, "modes", &modes); |
186 | json_object *current_mode; | 183 | json_object *width, *height, *refresh; |
187 | json_object_object_get_ex(o, "current_mode", ¤t_mode); | 184 | json_object_object_get_ex(o, "current_mode", ¤t_mode); |
185 | json_object_object_get_ex(current_mode, "width", &width); | ||
186 | json_object_object_get_ex(current_mode, "height", &height); | ||
187 | json_object_object_get_ex(current_mode, "refresh", &refresh); | ||
188 | 188 | ||
189 | if (json_object_get_boolean(active)) { | 189 | if (json_object_get_boolean(active)) { |
190 | printf( | 190 | printf( |
@@ -199,10 +199,8 @@ static void pretty_print_output(json_object *o) { | |||
199 | json_object_get_string(model), | 199 | json_object_get_string(model), |
200 | json_object_get_string(serial), | 200 | json_object_get_string(serial), |
201 | json_object_get_boolean(focused) ? " (focused)" : "", | 201 | json_object_get_boolean(focused) ? " (focused)" : "", |
202 | json_object_get_int( | 202 | json_object_get_int(width), |
203 | json_object_object_get(current_mode, "width")), | 203 | json_object_get_int(height), |
204 | json_object_get_int( | ||
205 | json_object_object_get(current_mode, "height")), | ||
206 | (float)json_object_get_int(refresh) / 1000, | 204 | (float)json_object_get_int(refresh) / 1000, |
207 | json_object_get_int(x), json_object_get_int(y), | 205 | json_object_get_int(x), json_object_get_int(y), |
208 | json_object_get_double(scale), | 206 | json_object_get_double(scale), |