summaryrefslogtreecommitdiff
path: root/src/login/logind-session.h
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-09-19 13:26:39 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-09-19 13:26:39 +0200
commit2ec3ff668ff03410e94cfef8e3ee9384a8222211 (patch)
tree37c90b9fff244178098d83f05b337a439d3a1168 /src/login/logind-session.h
parent16115b0a7b7cdf08fb38084d857d572d8a9088dc (diff)
login: pause devices before acknowledging VT switches
If a session controller does not need synchronous VT switches, we allow them to pass VT control to logind, which acknowledges all VT switches unconditionally. This works fine with all sessions using the dbus API, but causes out-of-sync device use if we switch to legacy sessions that are notified via VT signals. Those are processed before logind notices the session-switch via sysfs. Therefore, leaving the old session still active for a short amount of time. This, in fact, may cause the legacy session to prepare graphics devices before the old session was deactivated, and thus, maybe causing the old session to interfer with graphics device usage. Fix this by releasing devices immediately before acknowledging VT switches. This way, sessions without VT handlers are required to support async session switching (which they do in that case, anyway).
Diffstat (limited to 'src/login/logind-session.h')
-rw-r--r--src/login/logind-session.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/login/logind-session.h b/src/login/logind-session.h
index 9fb0188a8..a007fb5e8 100644
--- a/src/login/logind-session.h
+++ b/src/login/logind-session.h
@@ -174,6 +174,7 @@ KillWho kill_who_from_string(const char *s) _pure_;
int session_prepare_vt(Session *s);
void session_restore_vt(Session *s);
+void session_leave_vt(Session *s);
bool session_is_controller(Session *s, const char *sender);
int session_set_controller(Session *s, const char *sender, bool force);