Handle monitor enable
This commit is contained in:
parent
4c0d59c1a7
commit
3c3714aac0
11
dwl.c
11
dwl.c
@ -1463,10 +1463,17 @@ outputmgrapplyortest(struct wlr_output_configuration_v1 *config, bool test)
|
|||||||
|
|
||||||
wl_list_for_each(config_head, &config->heads, link) {
|
wl_list_for_each(config_head, &config->heads, link) {
|
||||||
struct wlr_output *wlr_output = config_head->state.output;
|
struct wlr_output *wlr_output = config_head->state.output;
|
||||||
|
Monitor *m;
|
||||||
|
|
||||||
wlr_output_enable(wlr_output, config_head->state.enabled);
|
wlr_output_enable(wlr_output, config_head->state.enabled);
|
||||||
if (!config_head->state.enabled) {
|
if (config_head->state.enabled) {
|
||||||
Monitor *m;
|
wl_list_for_each(m, &mons, link) {
|
||||||
|
if (m->wlr_output == wlr_output) {
|
||||||
|
wlr_output_set_mode(m->wlr_output, wlr_output_preferred_mode(m->wlr_output));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
wl_list_for_each(m, &mons, link) {
|
wl_list_for_each(m, &mons, link) {
|
||||||
if (m->wlr_output == wlr_output) {
|
if (m->wlr_output == wlr_output) {
|
||||||
closemon(m);
|
closemon(m);
|
||||||
|
Loading…
Reference in New Issue
Block a user