summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal/modeset.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-09-20 17:47:56 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-09-22 14:27:02 +0200
commitf6e3ee1493f20823b2c33465458b92f3581af88d (patch)
tree3104f362352ac1d5aa4d09c8df668cac8dd033f4 /src/libsystemd-terminal/modeset.c
parent89febb631a4710992cd41e402a643451b19c11a7 (diff)
terminal: raise sysview DEVICE_CHANGE events per attachment
Instead of raising DEVICE_CHANGE only per device, we now raise it per device-session attachment. This is what we want for all sysview users, anyway, as sessions are meant to be independent of each other. Lets avoid any external session iterators and just do that in sysview itself.
Diffstat (limited to 'src/libsystemd-terminal/modeset.c')
-rw-r--r--src/libsystemd-terminal/modeset.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libsystemd-terminal/modeset.c b/src/libsystemd-terminal/modeset.c
index 33c79a2036..7a28e7ab97 100644
--- a/src/libsystemd-terminal/modeset.c
+++ b/src/libsystemd-terminal/modeset.c
@@ -348,6 +348,13 @@ static int modeset_sysview_fn(sysview_context *c, void *userdata, sysview_event
grdev_session_remove_drm(m->grdev_session, sysview_device_get_ud(d));
break;
+ case SYSVIEW_EVENT_SESSION_REFRESH:
+ d = ev->session_refresh.device;
+ type = sysview_device_get_type(d);
+ if (type == SYSVIEW_DEVICE_DRM)
+ grdev_session_hotplug_drm(m->grdev_session, ev->session_refresh.ud);
+
+ break;
case SYSVIEW_EVENT_SESSION_CONTROL:
r = ev->session_control.error;
if (r < 0) {
@@ -362,13 +369,6 @@ 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;