aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/config/output.c1
-rw-r--r--sway/desktop/output.c1
-rw-r--r--sway/tree/output.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/sway/config/output.c b/sway/config/output.c
index 3c36692f..50bf1155 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -278,6 +278,7 @@ bool apply_output_config(struct output_config *oc, struct sway_output *output) {
sway_log(SWAY_ERROR, "Failed to modeset output %s", wlr_output->name);
return false;
}
+ output->current_mode = wlr_output->current_mode;
if (oc && oc->scale > 0) {
sway_log(SWAY_DEBUG, "Set %s scale to %f", oc->name, oc->scale);
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 42194d54..beb6ee79 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -662,6 +662,7 @@ static void update_output_manager_config(struct sway_server *server) {
root->output_layout, output->wlr_output);
// We mark the output enabled even if it is switched off by DPMS
config_head->state.enabled = output->enabled;
+ config_head->state.mode = output->current_mode;
if (output_box) {
config_head->state.x = output_box->x;
config_head->state.y = output_box->y;
diff --git a/sway/tree/output.c b/sway/tree/output.c
index 33fdee5e..07f04ee5 100644
--- a/sway/tree/output.c
+++ b/sway/tree/output.c
@@ -269,6 +269,7 @@ void output_disable(struct sway_output *output) {
output->enabled = false;
output->configured = false;
+ output->current_mode = NULL;
arrange_root();
}