summaryrefslogtreecommitdiff
path: root/src/login/logind.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-06-17 00:24:05 +0200
committerSven Eden <yamakuzure@gmx.net>2017-03-14 10:03:02 +0100
commit198eb9458184a7b82a85df1d03a3dd52f24f5f26 (patch)
treeb03fb9a74e7a3666234cef40ab97026ee7d8f76f /src/login/logind.h
parentb0c8498704d91b644ee3203177b0f602ab13826e (diff)
logind: rework display counting when detecting whether the system is docked
Previously, we'd just count connected displays, and if there was 2 or more we assumed a "docked" state. With this change we now: - Only count external displays, ignore internal ones (which we detect by checking the connector name against a whitelist of known external plug types) - We ignore connectors which are explicitly disabled - We then compare the count with >= 1 rather than >= 2 as before This new logic has the benefit that systems that disconnect the internal display when the lid is closed are better supported. Also, explicitly disabled ports do not confuse the algorithm anymore. This new algorithm has been suggested here: http://lists.freedesktop.org/archives/intel-gfx/2015-June/068821.html This also makes two functions static, that are not used outside of their .c files.
Diffstat (limited to 'src/login/logind.h')
-rw-r--r--src/login/logind.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/login/logind.h b/src/login/logind.h
index e12c59a01..ad437b72c 100644
--- a/src/login/logind.h
+++ b/src/login/logind.h
@@ -156,9 +156,7 @@ int manager_get_idle_hint(Manager *m, dual_timestamp *t);
int manager_get_user_by_pid(Manager *m, pid_t pid, User **user);
int manager_get_session_by_pid(Manager *m, pid_t pid, Session **session);
-bool manager_is_docked(Manager *m);
-int manager_count_displays(Manager *m);
-bool manager_is_docked_or_multiple_displays(Manager *m);
+bool manager_is_docked_or_external_displays(Manager *m);
extern const sd_bus_vtable manager_vtable[];