emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp/net dbus.el


From: Michael Albinus
Subject: [Emacs-diffs] emacs/lisp/net dbus.el
Date: Tue, 18 Aug 2009 15:12:01 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Michael Albinus <albinus>       09/08/18 15:12:01

Modified files:
        lisp/net       : dbus.el 

Log message:
        * net/dbus.el (dbus-init-bus): Declare.  Apply it for the :system
        and :session buses.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/net/dbus.el?cvsroot=emacs&r1=1.29&r2=1.30

Patches:
Index: dbus.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/dbus.el,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- dbus.el     27 Jul 2009 10:02:38 -0000      1.29
+++ dbus.el     18 Aug 2009 15:12:01 -0000      1.30
@@ -34,12 +34,22 @@
 ;; option "--without-dbus".  Declare used subroutines and variables.
 (declare-function dbus-call-method "dbusbind.c")
 (declare-function dbus-call-method-asynchronously "dbusbind.c")
+(declare-function dbus-init-bus "dbusbind.c")
 (declare-function dbus-method-return-internal "dbusbind.c")
 (declare-function dbus-method-error-internal "dbusbind.c")
 (declare-function dbus-register-signal "dbusbind.c")
 (defvar dbus-debug)
 (defvar dbus-registered-functions-table)
 
+;; Initialize :system and :session buses.  This adds their file
+;; descriptors to input_wait_mask, in order to detect incoming
+;; messages immediately.
+;; We must avoid to call the function twice for a bus, because the
+;; DBusWatch will be removed then.
+(when (and (featurep 'dbusbind) (not (featurep 'dbus)))
+  (dbus-init-bus :system)
+  (dbus-init-bus :session))
+
 ;; Pacify byte compiler.
 (eval-when-compile
   (require 'cl))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]