diff options
-rw-r--r-- | include/sway/output.h | 1 | ||||
-rw-r--r-- | sway/desktop/output.c | 10 |
2 files changed, 5 insertions, 6 deletions
diff --git a/include/sway/output.h b/include/sway/output.h index 5af5b731..28be6a1e 100644 --- a/include/sway/output.h +++ b/include/sway/output.h | |||
@@ -43,7 +43,6 @@ struct sway_output { | |||
43 | 43 | ||
44 | struct wl_listener destroy; | 44 | struct wl_listener destroy; |
45 | struct wl_listener commit; | 45 | struct wl_listener commit; |
46 | struct wl_listener mode; | ||
47 | struct wl_listener present; | 46 | struct wl_listener present; |
48 | struct wl_listener damage; | 47 | struct wl_listener damage; |
49 | struct wl_listener frame; | 48 | struct wl_listener frame; |
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 6999a382..f39b8ea7 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -805,7 +805,6 @@ static void handle_destroy(struct wl_listener *listener, void *data) { | |||
805 | 805 | ||
806 | wl_list_remove(&output->destroy.link); | 806 | wl_list_remove(&output->destroy.link); |
807 | wl_list_remove(&output->commit.link); | 807 | wl_list_remove(&output->commit.link); |
808 | wl_list_remove(&output->mode.link); | ||
809 | wl_list_remove(&output->present.link); | 808 | wl_list_remove(&output->present.link); |
810 | wl_list_remove(&output->damage.link); | 809 | wl_list_remove(&output->damage.link); |
811 | wl_list_remove(&output->frame.link); | 810 | wl_list_remove(&output->frame.link); |
@@ -822,8 +821,7 @@ static void handle_destroy(struct wl_listener *listener, void *data) { | |||
822 | update_output_manager_config(server); | 821 | update_output_manager_config(server); |
823 | } | 822 | } |
824 | 823 | ||
825 | static void handle_mode(struct wl_listener *listener, void *data) { | 824 | static void handle_mode(struct sway_output *output) { |
826 | struct sway_output *output = wl_container_of(listener, output, mode); | ||
827 | if (!output->enabled && !output->enabling) { | 825 | if (!output->enabled && !output->enabling) { |
828 | struct output_config *oc = find_output_config(output); | 826 | struct output_config *oc = find_output_config(output); |
829 | if (output->wlr_output->current_mode != NULL && | 827 | if (output->wlr_output->current_mode != NULL && |
@@ -862,6 +860,10 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
862 | struct sway_output *output = wl_container_of(listener, output, commit); | 860 | struct sway_output *output = wl_container_of(listener, output, commit); |
863 | struct wlr_output_event_commit *event = data; | 861 | struct wlr_output_event_commit *event = data; |
864 | 862 | ||
863 | if (event->committed & WLR_OUTPUT_STATE_MODE) { | ||
864 | handle_mode(output); | ||
865 | } | ||
866 | |||
865 | if (!output->enabled) { | 867 | if (!output->enabled) { |
866 | return; | 868 | return; |
867 | } | 869 | } |
@@ -954,8 +956,6 @@ void handle_new_output(struct wl_listener *listener, void *data) { | |||
954 | output->destroy.notify = handle_destroy; | 956 | output->destroy.notify = handle_destroy; |
955 | wl_signal_add(&wlr_output->events.commit, &output->commit); | 957 | wl_signal_add(&wlr_output->events.commit, &output->commit); |
956 | output->commit.notify = handle_commit; | 958 | output->commit.notify = handle_commit; |
957 | wl_signal_add(&wlr_output->events.mode, &output->mode); | ||
958 | output->mode.notify = handle_mode; | ||
959 | wl_signal_add(&wlr_output->events.present, &output->present); | 959 | wl_signal_add(&wlr_output->events.present, &output->present); |
960 | output->present.notify = handle_present; | 960 | output->present.notify = handle_present; |
961 | wl_signal_add(&wlr_output->events.damage, &output->damage); | 961 | wl_signal_add(&wlr_output->events.damage, &output->damage); |