aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/drm/backend.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/backend/drm/backend.c b/backend/drm/backend.c
index 27f9d045..cc48aa54 100644
--- a/backend/drm/backend.c
+++ b/backend/drm/backend.c
@@ -109,8 +109,11 @@ static void handle_session_active(struct wl_listener *listener, void *data) {
static void handle_dev_change(struct wl_listener *listener, void *data) {
struct wlr_drm_backend *drm = wl_container_of(listener, drm, dev_change);
- wlr_log(WLR_DEBUG, "%s invalidated", drm->name);
+ if (!drm->session->active) {
+ return;
+ }
+ wlr_log(WLR_DEBUG, "%s invalidated", drm->name);
scan_drm_connectors(drm);
}