diff --git a/Makefile b/Makefile index ab473ff..ecbef2a 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,10 @@ ifeq ($(USE_UNOPTIMIZED_DRAWING),yes) CFLAGS+=-DUSE_UNOPTIMIZED_DRAWING endif +ifeq ($(USE_SINGLEBUFFERED_TIMELINE),yes) + CFLAGS+=-DUSE_SINGLEBUFFERED_TIMELINE +endif + CFLAGS+=-DVERSION=\"$(VERSION)\" \ -DINSTALL_PREFIX=\"$(prefix)\" \ -DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \ diff --git a/Timeline/Timeline.C b/Timeline/Timeline.C index 3097578..a070d11 100644 --- a/Timeline/Timeline.C +++ b/Timeline/Timeline.C @@ -46,6 +46,11 @@ #include "const.h" #include "util/debug.h" +#ifdef USE_SINGLEBUFFERED_TIMELINE +#warning Using singlebuffered timeline window. This may cause flicker and makes the cursors invisible. +#define redraw_overlay() +#endif + bool Timeline::draw_with_measure_lines = true; diff --git a/Timeline/Timeline.H b/Timeline/Timeline.H index 894fbfb..a0a3e5b 100644 --- a/Timeline/Timeline.H +++ b/Timeline/Timeline.H @@ -51,18 +51,11 @@ class Scalebar; class Sequence; class Sequence_Widget; -// disables double-buffering to make unnecessary redrawing more apparent -// #define DEBUG_TIMELINE_DRAWING - -#ifndef DEBUG_TIMELINE_DRAWING - +#ifndef USE_SINGLEBUFFERED_TIMELINE #include - #else - #include #define Fl_Overlay_Window Fl_Single_Window -#define redraw_overlay() #endif struct position_info; diff --git a/configure b/configure index 034befb..aaa12af 100755 --- a/configure +++ b/configure @@ -13,7 +13,11 @@ ask "Installation prefix" prefix /usr/local ask "Use the LASH Audio Session Handler" USE_LASH yes ask "Build for debugging" USE_DEBUG no -using DEBUG && ask "Use unoptimized drawing routines" USE_UNOPTIMIZED_DRAWING no +using DEBUG && +{ + ask "Use unoptimized drawing routines" USE_UNOPTIMIZED_DRAWING no + ask "Use singlebuffered timeline" USE_SINGLEBUFFERED_TIMELINE no +} begin_tests