aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/debug.h
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-18 16:58:50 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-19 16:17:24 +1000
commit8d1dd038233cf946b36813c4c8508c17f4cda0fc (patch)
treee672976231d33467da6c8a03633c604eb0c8deb8 /include/sway/debug.h
parentMerge pull request #2453 from ianyfan/commands (diff)
downloadsway-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 'include/sway/debug.h')
-rw-r--r--include/sway/debug.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/include/sway/debug.h b/include/sway/debug.h
index 38d4eccd..5dcd9e00 100644
--- a/include/sway/debug.h
+++ b/include/sway/debug.h
@@ -1,15 +1,18 @@
1#ifndef SWAY_DEBUG_H 1#ifndef SWAY_DEBUG_H
2#define SWAY_DEBUG_H 2#define SWAY_DEBUG_H
3#include <stdbool.h>
3 4
4// Tree 5struct sway_debug {
5extern bool enable_debug_tree; 6 bool highlight_damage; // Highlight regions of the screen being damaged
6void update_debug_tree(); 7 bool noatomic; // Ignore atomic layout updates
8 bool nodamage; // Render the full output on each frame
9 bool render_tree; // Render the tree overlay
10 bool txn_timings; // Log verbose messages about transactions
11 bool txn_wait; // Always wait for the timeout before applying
12};
7 13
8// Damage 14extern struct sway_debug debug;
9extern const char *damage_debug;
10 15
11// Transactions 16void update_debug_tree();
12extern int txn_timeout_ms;
13extern bool txn_debug;
14 17
15#endif 18#endif