diff mbox series

[BlueZ,v3,2/2] input.conf: Change IdleTimeout unit to be in seconds

Message ID 20240328153252.1752439-2-luiz.dentz@gmail.com
State Superseded
Headers show
Series [BlueZ,v3,1/2] input/device: Fix not handling IdleTimeout when uhid is in use | expand

Commit Message

Luiz Augusto von Dentz March 28, 2024, 3:32 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This changes IdleTimeout unit to be in seconds instead of in minutes
which offer better granularity.
---
 profiles/input/input.conf | 5 +++--
 profiles/input/manager.c  | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/profiles/input/input.conf b/profiles/input/input.conf
index fc20c58b6b32..273e15bc9c80 100644
--- a/profiles/input/input.conf
+++ b/profiles/input/input.conf
@@ -4,8 +4,9 @@ 
 # particular interface
 [General]
 
-# Set idle timeout (in minutes) before the connection will
-# be disconnect (defaults to 0 for no timeout)
+# Set idle timeout (in seconds) before the connection will be disconnect and
+# the input device is removed.
+# Defaults: 0 (disabled)
 #IdleTimeout=0
 
 # Enable HID protocol handling in userspace input profile
diff --git a/profiles/input/manager.c b/profiles/input/manager.c
index 92789a003c89..f4598bcd4e47 100644
--- a/profiles/input/manager.c
+++ b/profiles/input/manager.c
@@ -89,7 +89,7 @@  static int input_init(void)
 							"IdleTimeout", &err);
 		if (!err) {
 			DBG("input.conf: IdleTimeout=%d", idle_timeout);
-			input_set_idle_timeout(idle_timeout * 60);
+			input_set_idle_timeout(idle_timeout);
 		} else
 			g_clear_error(&err);