From e64af8e4ed7e9f69acb5807237b62eff06a0b7a1 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 18 Mar 2024 11:28:16 -0600 Subject: [PATCH] add a test for an environment variable before switching canvas single-expose off --- libs/canvas/canvas.cc | 10 ++++++++++ libs/canvas/canvas/canvas.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libs/canvas/canvas.cc b/libs/canvas/canvas.cc index 783f3dd678..10ff37196b 100644 --- a/libs/canvas/canvas.cc +++ b/libs/canvas/canvas.cc @@ -554,6 +554,16 @@ GtkCanvas::GtkCanvas () Gdk::KEY_PRESS_MASK | Gdk::KEY_RELEASE_MASK); } +void +GtkCanvas::set_single_exposure (bool yn) +{ + if (g_getenv ("ARDOUR_CANVAS_SINGLE_EXPOSE_ALWAYS")) { + yn = true; + } + + _single_exposure = yn; +} + void GtkCanvas::use_nsglview (bool retina) { diff --git a/libs/canvas/canvas/canvas.h b/libs/canvas/canvas/canvas.h index e0d4b66014..f4ad37e920 100644 --- a/libs/canvas/canvas/canvas.h +++ b/libs/canvas/canvas/canvas.h @@ -235,7 +235,7 @@ public: bool get_mouse_position (Duple& winpos) const; - void set_single_exposure (bool s) { _single_exposure = s; } + void set_single_exposure (bool s); bool single_exposure () { return _single_exposure; } void re_enter ();