aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-07-14 11:24:22 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-07-14 20:44:32 -0400
commitb1afcc69fa70c20d815940fc25189063ed59ae0f (patch)
treeb5876df0592a14729b09de80fc7fabfaf01065b4 /sway/desktop/render.c
parentMerge pull request #2271 from RedSoxFan/implement-1569 (diff)
downloadsway-b1afcc69fa70c20d815940fc25189063ed59ae0f.tar.gz
sway-b1afcc69fa70c20d815940fc25189063ed59ae0f.tar.zst
sway-b1afcc69fa70c20d815940fc25189063ed59ae0f.zip
Add extended debugging flags
We currently have several ways of setting debug flags, including command line arguments, environment variables, and compile-time macros. This replaces the lot with command line flags.
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index b370f8a2..4bfc573b 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -15,6 +15,7 @@
15#include <wlr/util/region.h> 15#include <wlr/util/region.h>
16#include "log.h" 16#include "log.h"
17#include "sway/config.h" 17#include "sway/config.h"
18#include "sway/debug.h"
18#include "sway/input/input-manager.h" 19#include "sway/input/input-manager.h"
19#include "sway/input/seat.h" 20#include "sway/input/seat.h"
20#include "sway/layers.h" 21#include "sway/layers.h"
@@ -786,6 +787,8 @@ static void render_floating(struct sway_output *soutput,
786 } 787 }
787} 788}
788 789
790const char *damage_debug = NULL;
791
789void output_render(struct sway_output *output, struct timespec *when, 792void output_render(struct sway_output *output, struct timespec *when,
790 pixman_region32_t *damage) { 793 pixman_region32_t *damage) {
791 struct wlr_output *wlr_output = output->wlr_output; 794 struct wlr_output *wlr_output = output->wlr_output;
@@ -805,7 +808,6 @@ void output_render(struct sway_output *output, struct timespec *when,
805 goto renderer_end; 808 goto renderer_end;
806 } 809 }
807 810
808 const char *damage_debug = getenv("SWAY_DAMAGE_DEBUG");
809 if (damage_debug != NULL) { 811 if (damage_debug != NULL) {
810 if (strcmp(damage_debug, "highlight") == 0) { 812 if (strcmp(damage_debug, "highlight") == 0) {
811 wlr_renderer_clear(renderer, (float[]){1, 1, 0, 1}); 813 wlr_renderer_clear(renderer, (float[]){1, 1, 0, 1});