summaryrefslogtreecommitdiff
path: root/lisp/net/dbus.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/net/dbus.el')
-rw-r--r--lisp/net/dbus.el27
1 files changed, 16 insertions, 11 deletions
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 4116d293e1b..411249767f5 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -2073,7 +2073,8 @@ either a method name, a signal name, or an error name."
(goto-char point)))
(defun dbus-monitor-handler (&rest _args)
- "Default handler for the \"org.freedesktop.DBus.Monitoring.BecomeMonitor\" interface.
+ "Default handler for the \"Monitoring.BecomeMonitor\" interface.
+Its full name is \"org.freedesktop.DBus.Monitoring.BecomeMonitor\".
It will be applied for all objects created by `dbus-register-monitor'
which don't declare an own handler. The printed timestamps do
not reflect the time the D-Bus message has passed the D-Bus
@@ -2101,7 +2102,7 @@ has been handled by this function."
(interface (dbus-event-interface-name event))
(member (dbus-event-member-name event))
(arguments (dbus-event-arguments event))
- (time (time-to-seconds (current-time))))
+ (time (float-time)))
(save-excursion
;; Check for matching method-call.
(goto-char (point-max))
@@ -2251,15 +2252,19 @@ keywords `:system-private' or `:session-private', respectively."
bus nil dbus-path-local dbus-interface-local
"Disconnected" #'dbus-handle-bus-disconnect)))
-
-;; Initialize `:system' and `:session' buses. This adds their file
-;; descriptors to input_wait_mask, in order to detect incoming
-;; messages immediately.
-(when (featurep 'dbusbind)
- (dbus-ignore-errors
- (dbus-init-bus :system))
- (dbus-ignore-errors
- (dbus-init-bus :session)))
+
+(defun dbus--init ()
+ ;; Initialize `:system' and `:session' buses. This adds their file
+ ;; descriptors to input_wait_mask, in order to detect incoming
+ ;; messages immediately.
+ (when (featurep 'dbusbind)
+ (dbus-ignore-errors
+ (dbus-init-bus :system))
+ (dbus-ignore-errors
+ (dbus-init-bus :session))))
+
+(add-hook 'after-pdump-load-hook #'dbus--init)
+(dbus--init)
(provide 'dbus)