diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-18 16:58:50 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-08-19 16:17:24 +1000 |
commit | 8d1dd038233cf946b36813c4c8508c17f4cda0fc (patch) | |
tree | e672976231d33467da6c8a03633c604eb0c8deb8 /sway/main.c | |
parent | Merge pull request #2453 from ianyfan/commands (diff) | |
download | sway-8d1dd038233cf946b36813c4c8508c17f4cda0fc.tar.gz sway-8d1dd038233cf946b36813c4c8508c17f4cda0fc.tar.zst sway-8d1dd038233cf946b36813c4c8508c17f4cda0fc.zip |
Standardise debug variables
This makes all debug options stored in a single struct rather than in
various places, changes/fixes the behaviour of existing options, and
introduces some new options.
* Fixes damage issues with `-Drender-tree` texture (by removing scissor)
* Offsets the render tree overlay's `y` position for those who have
swaybar at the top
* Replaces `-Ddamage=rerender` with `-Dnodamage`
* Replaces `-Ddamage=highlight` with `-Dhighlight-damage`
* Replaces `-Dtxn-debug` with `-Dtxn-wait`
* Introduces `-Dnoatomic`
* Removes the `create_time` and `ms_arranging` figures from transactions
and the log message. Transactions are created after arranging and the
create time is of no significance.
* Fixes `-Dtxn-debug` (now `-Dtxn-wait`) not working.
Diffstat (limited to 'sway/main.c')
-rw-r--r-- | sway/main.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/sway/main.c b/sway/main.c index 54f48340..7a1afd4c 100644 --- a/sway/main.c +++ b/sway/main.c | |||
@@ -235,14 +235,20 @@ static void drop_permissions(bool keep_caps) { | |||
235 | } | 235 | } |
236 | 236 | ||
237 | void enable_debug_flag(const char *flag) { | 237 | void enable_debug_flag(const char *flag) { |
238 | if (strcmp(flag, "render-tree") == 0) { | 238 | if (strcmp(flag, "highlight-damage") == 0) { |
239 | enable_debug_tree = true; | 239 | debug.highlight_damage = true; |
240 | } else if (strncmp(flag, "damage=", 7) == 0) { | 240 | } else if (strcmp(flag, "noatomic") == 0) { |
241 | damage_debug = &flag[7]; | 241 | debug.noatomic = true; |
242 | } else if (strcmp(flag, "txn-debug") == 0) { | 242 | } else if (strcmp(flag, "nodamage") == 0) { |
243 | txn_debug = true; | 243 | debug.nodamage = true; |
244 | } else if (strcmp(flag, "render-tree") == 0) { | ||
245 | debug.render_tree = true; | ||
246 | } else if (strcmp(flag, "txn-wait") == 0) { | ||
247 | debug.txn_wait = true; | ||
248 | } else if (strcmp(flag, "txn-timings") == 0) { | ||
249 | debug.txn_timings = true; | ||
244 | } else if (strncmp(flag, "txn-timeout=", 12) == 0) { | 250 | } else if (strncmp(flag, "txn-timeout=", 12) == 0) { |
245 | txn_timeout_ms = atoi(&flag[12]); | 251 | server.txn_timeout_ms = atoi(&flag[12]); |
246 | } | 252 | } |
247 | } | 253 | } |
248 | 254 | ||