chiark / gitweb /
terminal: modeset: forward DEVICE_CHANGE events into grdev
authorDavid Herrmann <dh.herrmann@gmail.com>
Sat, 20 Sep 2014 07:46:13 +0000 (09:46 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Sat, 20 Sep 2014 09:46:49 +0000 (11:46 +0200)
Properly forward DEVICE_CHANGE events into grdev so we can react to
changing display setups.

src/libsystemd-terminal/modeset.c

index c1119c9..57bf299 100644 (file)
@@ -364,6 +364,13 @@ static int modeset_sysview_fn(sysview_context *c, void *userdata, sysview_event
                 }
 
                 break;
+        case SYSVIEW_EVENT_DEVICE_CHANGE:
+                d = ev->device_change.device;
+                type = sysview_device_get_type(d);
+                if (type == SYSVIEW_DEVICE_DRM)
+                        grdev_session_hotplug_drm(m->grdev_session, ev->device_change.ud);
+
+                break;
         }
 
         return 0;