diff options
-rw-r--r-- | sway/desktop/output.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 1b72fc21..0cc08525 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -507,30 +507,6 @@ static void damage_handle_destroy(struct wl_listener *listener, void *data) { | |||
507 | transaction_commit_dirty(); | 507 | transaction_commit_dirty(); |
508 | } | 508 | } |
509 | 509 | ||
510 | static void update_output_manager_config(struct sway_server *server) { | ||
511 | struct wlr_output_configuration_v1 *config = | ||
512 | wlr_output_configuration_v1_create(); | ||
513 | |||
514 | struct sway_output *output; | ||
515 | wl_list_for_each(output, &root->all_outputs, link) { | ||
516 | if (output == root->noop_output) { | ||
517 | continue; | ||
518 | } | ||
519 | struct wlr_output_configuration_head_v1 *config_head = | ||
520 | wlr_output_configuration_head_v1_create(config, output->wlr_output); | ||
521 | struct wlr_box *output_box = wlr_output_layout_get_box( | ||
522 | root->output_layout, output->wlr_output); | ||
523 | // We mark the output enabled even if it is switched off by DPMS | ||
524 | config_head->state.enabled = output->enabled; | ||
525 | if (output_box) { | ||
526 | config_head->state.x = output_box->x; | ||
527 | config_head->state.y = output_box->y; | ||
528 | } | ||
529 | } | ||
530 | |||
531 | wlr_output_manager_v1_set_configuration(server->output_manager_v1, config); | ||
532 | } | ||
533 | |||
534 | static void handle_destroy(struct wl_listener *listener, void *data) { | 510 | static void handle_destroy(struct wl_listener *listener, void *data) { |
535 | struct sway_output *output = wl_container_of(listener, output, destroy); | 511 | struct sway_output *output = wl_container_of(listener, output, destroy); |
536 | wl_signal_emit(&output->events.destroy, output); | 512 | wl_signal_emit(&output->events.destroy, output); |
@@ -549,8 +525,6 @@ static void handle_destroy(struct wl_listener *listener, void *data) { | |||
549 | wl_list_remove(&output->damage_frame.link); | 525 | wl_list_remove(&output->damage_frame.link); |
550 | 526 | ||
551 | transaction_commit_dirty(); | 527 | transaction_commit_dirty(); |
552 | |||
553 | update_output_manager_config(output->server); | ||
554 | } | 528 | } |
555 | 529 | ||
556 | static void handle_mode(struct wl_listener *listener, void *data) { | 530 | static void handle_mode(struct wl_listener *listener, void *data) { |
@@ -574,8 +548,6 @@ static void handle_mode(struct wl_listener *listener, void *data) { | |||
574 | arrange_layers(output); | 548 | arrange_layers(output); |
575 | arrange_output(output); | 549 | arrange_output(output); |
576 | transaction_commit_dirty(); | 550 | transaction_commit_dirty(); |
577 | |||
578 | update_output_manager_config(output->server); | ||
579 | } | 551 | } |
580 | 552 | ||
581 | static void handle_transform(struct wl_listener *listener, void *data) { | 553 | static void handle_transform(struct wl_listener *listener, void *data) { |
@@ -586,8 +558,6 @@ static void handle_transform(struct wl_listener *listener, void *data) { | |||
586 | arrange_layers(output); | 558 | arrange_layers(output); |
587 | arrange_output(output); | 559 | arrange_output(output); |
588 | transaction_commit_dirty(); | 560 | transaction_commit_dirty(); |
589 | |||
590 | update_output_manager_config(output->server); | ||
591 | } | 561 | } |
592 | 562 | ||
593 | static void update_textures(struct sway_container *con, void *data) { | 563 | static void update_textures(struct sway_container *con, void *data) { |
@@ -604,8 +574,6 @@ static void handle_scale(struct wl_listener *listener, void *data) { | |||
604 | output_for_each_container(output, update_textures, NULL); | 574 | output_for_each_container(output, update_textures, NULL); |
605 | arrange_output(output); | 575 | arrange_output(output); |
606 | transaction_commit_dirty(); | 576 | transaction_commit_dirty(); |
607 | |||
608 | update_output_manager_config(output->server); | ||
609 | } | 577 | } |
610 | 578 | ||
611 | static void send_presented_iterator(struct sway_output *output, | 579 | static void send_presented_iterator(struct sway_output *output, |