diff options
-rw-r--r-- | sway/desktop/output.c | 21 | ||||
-rw-r--r-- | sway/desktop/render.c | 3 |
2 files changed, 4 insertions, 20 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index dea087c6..400f1d66 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -498,7 +498,8 @@ static bool scan_out_fullscreen_view(struct sway_output *output, | |||
498 | return false; | 498 | return false; |
499 | } | 499 | } |
500 | 500 | ||
501 | wlr_presentation_surface_sampled(server.presentation, surface); | 501 | wlr_presentation_surface_sampled_on_output(server.presentation, surface, |
502 | wlr_output); | ||
502 | 503 | ||
503 | if (!wlr_output_attach_buffer(wlr_output, surface->buffer)) { | 504 | if (!wlr_output_attach_buffer(wlr_output, surface->buffer)) { |
504 | return false; | 505 | return false; |
@@ -842,14 +843,6 @@ static void handle_scale(struct wl_listener *listener, void *data) { | |||
842 | update_output_manager_config(output->server); | 843 | update_output_manager_config(output->server); |
843 | } | 844 | } |
844 | 845 | ||
845 | static void send_presented_iterator(struct sway_output *output, struct sway_view *view, | ||
846 | struct wlr_surface *surface, struct wlr_box *box, float rotation, | ||
847 | void *data) { | ||
848 | struct wlr_presentation_event *event = data; | ||
849 | wlr_presentation_send_surface_presented(server.presentation, | ||
850 | surface, event); | ||
851 | } | ||
852 | |||
853 | static void handle_present(struct wl_listener *listener, void *data) { | 846 | static void handle_present(struct wl_listener *listener, void *data) { |
854 | struct sway_output *output = wl_container_of(listener, output, present); | 847 | struct sway_output *output = wl_container_of(listener, output, present); |
855 | struct wlr_output_event_present *output_event = data; | 848 | struct wlr_output_event_present *output_event = data; |
@@ -860,16 +853,6 @@ static void handle_present(struct wl_listener *listener, void *data) { | |||
860 | 853 | ||
861 | output->last_presentation = *output_event->when; | 854 | output->last_presentation = *output_event->when; |
862 | output->refresh_nsec = output_event->refresh; | 855 | output->refresh_nsec = output_event->refresh; |
863 | |||
864 | struct wlr_presentation_event event = { | ||
865 | .output = output->wlr_output, | ||
866 | .tv_sec = (uint64_t)output_event->when->tv_sec, | ||
867 | .tv_nsec = (uint32_t)output_event->when->tv_nsec, | ||
868 | .refresh = (uint32_t)output_event->refresh, | ||
869 | .seq = (uint64_t)output_event->seq, | ||
870 | .flags = output_event->flags, | ||
871 | }; | ||
872 | output_for_each_surface(output, send_presented_iterator, &event); | ||
873 | } | 856 | } |
874 | 857 | ||
875 | void handle_new_output(struct wl_listener *listener, void *data) { | 858 | void handle_new_output(struct wl_listener *listener, void *data) { |
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index c432b476..960fe083 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c | |||
@@ -121,7 +121,8 @@ static void render_surface_iterator(struct sway_output *output, struct sway_view | |||
121 | 121 | ||
122 | render_texture(wlr_output, output_damage, texture, &box, matrix, alpha); | 122 | render_texture(wlr_output, output_damage, texture, &box, matrix, alpha); |
123 | 123 | ||
124 | wlr_presentation_surface_sampled(server.presentation, surface); | 124 | wlr_presentation_surface_sampled_on_output(server.presentation, surface, |
125 | wlr_output); | ||
125 | } | 126 | } |
126 | 127 | ||
127 | static void render_layer(struct sway_output *output, | 128 | static void render_layer(struct sway_output *output, |