backend/drm: use early return in handle_session_active()

master
Simon Ser 9 months ago
parent 9a685cefa9
commit c397515ee5

@ -100,8 +100,12 @@ static void handle_session_active(struct wl_listener *listener, void *data) {
wl_container_of(listener, drm, session_active); wl_container_of(listener, drm, session_active);
struct wlr_session *session = drm->session; struct wlr_session *session = drm->session;
if (session->active) { wlr_log(WLR_INFO, "DRM FD %s", session->active ? "resumed" : "paused");
wlr_log(WLR_INFO, "DRM fd resumed");
if (!session->active) {
return;
}
scan_drm_connectors(drm, NULL); scan_drm_connectors(drm, NULL);
// The previous DRM master leaves KMS in an undefined state. We need // The previous DRM master leaves KMS in an undefined state. We need
@ -139,9 +143,6 @@ static void handle_session_active(struct wl_listener *listener, void *data) {
} }
wlr_output_state_finish(&state); wlr_output_state_finish(&state);
} }
} else {
wlr_log(WLR_INFO, "DRM fd paused");
}
} }
static void handle_dev_change(struct wl_listener *listener, void *data) { static void handle_dev_change(struct wl_listener *listener, void *data) {

Loading…
Cancel
Save