diff --git a/config.def.h b/config.def.h index 75e25be..f3ec4c0 100644 --- a/config.def.h +++ b/config.def.h @@ -28,12 +28,12 @@ static const Layout layouts[] = { * The order in which monitors are defined determines their position. * Non-configured monitors are always added to the left. */ static const MonitorRule monrules[] = { - /* name mfact nmaster scale layout rotate/reflect x y resx resy rate custom*/ + /* name mfact nmaster scale layout rotate/reflect x y resx resy rate adaptive custom*/ /* example of a HiDPI laptop monitor at 120Hz: - { "eDP-1", 0.5, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 0, 0, 0, 120.000 , 0}, + { "eDP-1", 0.5, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 0, 0, 0, 120.000, 1, 0}, */ /* defaults */ - { NULL, 0.55, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 0, 0, 0, 0, 0}, + { NULL, 0.55, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 0, 0, 0, 0, 0, 0}, }; /* keyboard */ diff --git a/dwl.c b/dwl.c index 537d758..4965151 100644 --- a/dwl.c +++ b/dwl.c @@ -192,6 +192,7 @@ typedef struct { int resx; int resy; int rate; + bool adaptive_true; bool custom_mode; } MonitorRule; @@ -852,6 +853,7 @@ createmon(struct wl_listener *listener, void *data) struct wlr_output *wlr_output = data; const struct wlr_output_mode *wlr_output_mode; int32_t resx,resy,rate; + bool adaptive_true; bool custom_mode; const MonitorRule *r; Monitor *m = wlr_output->data = calloc(1, sizeof(*m)); @@ -898,7 +900,8 @@ createmon(struct wl_listener *listener, void *data) } } - wlr_output_enable_adaptive_sync(wlr_output, 1); + if (adaptive_true) + wlr_output_enable_adaptive_sync(wlr_output, 1); /* Set up event listeners */ LISTEN(&wlr_output->events.frame, &m->frame, rendermon);