mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
backend/drm: use early return in handle_session_active()
This commit is contained in:
parent
9a685cefa9
commit
c397515ee5
1 changed files with 37 additions and 36 deletions
|
@ -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…
Reference in a new issue