enable/commit output at end of function

This commit is contained in:
Devin J. Pohly 2020-04-26 11:32:45 -05:00
parent 5ce5d11c2d
commit b50f330e60

7
dwl.c
View File

@ -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