aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/drm/drm.c8
-rw-r--r--types/wlr_output.c2
2 files changed, 7 insertions, 3 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 927388b0..8062a478 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -785,14 +785,18 @@ static void page_flip_handler(int fd, unsigned seq,
struct wlr_backend_state *drm =
wl_container_of(output->renderer, drm, renderer);
+ output->pageflip_pending = false;
+ if (output->state != WLR_DRM_OUTPUT_CONNECTED) {
+ return;
+ }
+
struct wlr_drm_plane *plane = output->crtc->primary;
if (plane->front) {
gbm_surface_release_buffer(plane->gbm, plane->front);
plane->front = NULL;
}
- output->pageflip_pending = false;
- if (output->state == WLR_DRM_OUTPUT_CONNECTED && drm->session->active) {
+ if (drm->session->active) {
wl_signal_emit(&output->base->events.frame, output->base);
}
}
diff --git a/types/wlr_output.c b/types/wlr_output.c
index 9f051956..3d3acb4f 100644
--- a/types/wlr_output.c
+++ b/types/wlr_output.c
@@ -121,8 +121,8 @@ bool wlr_output_set_mode(struct wlr_output *output, struct wlr_output_mode *mode
void wlr_output_transform(struct wlr_output *output,
enum wl_output_transform transform) {
- wlr_output_update_matrix(output);
output->impl->transform(output->state, transform);
+ wlr_output_update_matrix(output);
}
bool wlr_output_set_cursor(struct wlr_output *output,