aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2023-07-31 10:07:17 +0200
committerLibravatar Simon Ser <contact@emersion.fr>2023-07-31 16:25:01 +0200
commitd3626efe5ef96f056f72f320a6487947ff22f8d9 (patch)
tree2a9e17ec2d911fd6edfc94982ee53b543e63de6b
parentdesktop/output: drop logic to handle backend-applied mode (diff)
downloadsway-d3626efe5ef96f056f72f320a6487947ff22f8d9.tar.gz
sway-d3626efe5ef96f056f72f320a6487947ff22f8d9.tar.zst
sway-d3626efe5ef96f056f72f320a6487947ff22f8d9.zip
desktop/output: drop handle_mode()
We already perform the exact same logic on transform/scale change.
-rw-r--r--sway/desktop/output.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index b5993d23..f052e6f4 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -926,18 +926,6 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
926 update_output_manager_config(server); 926 update_output_manager_config(server);
927} 927}
928 928
929static void handle_mode(struct sway_output *output) {
930 if (!output->enabled) {
931 return;
932 }
933
934 arrange_layers(output);
935 arrange_output(output);
936 transaction_commit_dirty();
937
938 update_output_manager_config(output->server);
939}
940
941static void update_textures(struct sway_container *con, void *data) { 929static void update_textures(struct sway_container *con, void *data) {
942 container_update_title_textures(con); 930 container_update_title_textures(con);
943 container_update_marks_textures(con); 931 container_update_marks_textures(con);
@@ -953,10 +941,6 @@ static void handle_commit(struct wl_listener *listener, void *data) {
953 struct sway_output *output = wl_container_of(listener, output, commit); 941 struct sway_output *output = wl_container_of(listener, output, commit);
954 struct wlr_output_event_commit *event = data; 942 struct wlr_output_event_commit *event = data;
955 943
956 if (event->committed & WLR_OUTPUT_STATE_MODE) {
957 handle_mode(output);
958 }
959
960 if (!output->enabled) { 944 if (!output->enabled) {
961 return; 945 return;
962 } 946 }
@@ -966,7 +950,7 @@ static void handle_commit(struct wl_listener *listener, void *data) {
966 output_for_each_surface(output, update_output_scale_iterator, NULL); 950 output_for_each_surface(output, update_output_scale_iterator, NULL);
967 } 951 }
968 952
969 if (event->committed & (WLR_OUTPUT_STATE_TRANSFORM | WLR_OUTPUT_STATE_SCALE)) { 953 if (event->committed & (WLR_OUTPUT_STATE_MODE | WLR_OUTPUT_STATE_TRANSFORM | WLR_OUTPUT_STATE_SCALE)) {
970 arrange_layers(output); 954 arrange_layers(output);
971 arrange_output(output); 955 arrange_output(output);
972 transaction_commit_dirty(); 956 transaction_commit_dirty();