mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 00:11:28 +00:00
Merge pull request #2553 from emersion/disabled-no-modeset
Do not modeset disabled outputs
This commit is contained in:
commit
c9276f04c9
|
@ -196,6 +196,10 @@ void apply_output_config(struct output_config *oc, struct sway_container *output
|
||||||
wlr_log(WLR_DEBUG, "Set %s mode to %dx%d (%f GHz)", oc->name, oc->width,
|
wlr_log(WLR_DEBUG, "Set %s mode to %dx%d (%f GHz)", oc->name, oc->width,
|
||||||
oc->height, oc->refresh_rate);
|
oc->height, oc->refresh_rate);
|
||||||
set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate);
|
set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate);
|
||||||
|
} else if (!wl_list_empty(&wlr_output->modes)) {
|
||||||
|
struct wlr_output_mode *mode =
|
||||||
|
wl_container_of(wlr_output->modes.prev, mode, link);
|
||||||
|
wlr_output_set_mode(wlr_output, mode);
|
||||||
}
|
}
|
||||||
if (oc && oc->scale > 0) {
|
if (oc && oc->scale > 0) {
|
||||||
wlr_log(WLR_DEBUG, "Set %s scale to %f", oc->name, oc->scale);
|
wlr_log(WLR_DEBUG, "Set %s scale to %f", oc->name, oc->scale);
|
||||||
|
|
|
@ -559,12 +559,6 @@ void handle_new_output(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
wl_list_insert(&root_container.sway_root->all_outputs, &output->link);
|
wl_list_insert(&root_container.sway_root->all_outputs, &output->link);
|
||||||
|
|
||||||
if (!wl_list_empty(&wlr_output->modes)) {
|
|
||||||
struct wlr_output_mode *mode =
|
|
||||||
wl_container_of(wlr_output->modes.prev, mode, link);
|
|
||||||
wlr_output_set_mode(wlr_output, mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
output_enable(output);
|
output_enable(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue