diff --git a/dwl.c b/dwl.c index c8a34dd..20d7043 100644 --- a/dwl.c +++ b/dwl.c @@ -332,9 +332,6 @@ createmon(struct wl_listener *listener, void *data) if (!wl_list_empty(&wlr_output->modes)) { struct wlr_output_mode *mode = wlr_output_preferred_mode(wlr_output); wlr_output_set_mode(wlr_output, mode); - wlr_output_enable(wlr_output, true); - if (!wlr_output_commit(wlr_output)) - return; } /* Allocates and configures monitor state using configured rules */ @@ -358,6 +355,10 @@ createmon(struct wl_listener *listener, void *data) wl_signal_add(&wlr_output->events.frame, &m->frame); wl_list_insert(&mons, &m->link); + wlr_output_enable(wlr_output, true); + if (!wlr_output_commit(wlr_output)) + return; + /* Adds this to the output layout. The add_auto function arranges outputs * from left-to-right in the order they appear. A more sophisticated * compositor would let the user configure the arrangement of outputs in the