[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reading D-Bus messages
From: |
Michael Albinus |
Subject: |
Re: Reading D-Bus messages |
Date: |
Sat, 25 Sep 2010 18:52:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Jan Djärv <address@hidden> writes:
> We should have a general way to add file descriptors and get a
> callback for them. In the mean time, do something like this in
> process.c:
>
> static SELECT_TYPE dbus_mask;
>
> void
> add_dbus_fd (int fd)
> {
> FD_SET (fd, &dbus_mask);
> add_keyboard_wait_descriptor (fd);
> }
>
> void
> remove_dbus_fd (int fd)
> {
> FD_CLR (fd, &dbus_mask);
> remove_keyboard_wait_descriptor (fd);
> }
>
> After this wait_reading_process_output
>
> /* Check for data from a process. */
> if (no_avail || nfds == 0)
> continue;
>
> add
> for (channel = 0; channel <= max_keyboard_desc; ++channel)
> if (FD_ISSET (channel, &dbus_mask) && FD_ISSET (channel, &Available))
> {
> xd_read_queued_messages ();
> break; /* All dbus channels has been read, exit loop */
> }
>
> and in init_process:
>
> FD_ZERO (&dbus_mask);
>
> Use remove_dbus_fd and add_dbus_fd in dbusbind.c.
> But maybe I'll add that general input mechanism instead, well see.
I have added this, and it works fine in an X11 environment. I guess,
redisplay() does the job.
If I test it in a non-X11 terminal, arriving D-Bus messages are
recognised only after pressing a character on the keyboard. So at least
an additional trigger is missing to handle this event in time.
> Jan D.
Best regards, Michael.
- Re: Reading D-Bus messages, (continued)
- Re: Reading D-Bus messages, Ken Brown, 2010/09/23
- Re: Reading D-Bus messages, Eli Zaretskii, 2010/09/23
- Re: Reading D-Bus messages, Michael Albinus, 2010/09/24
- Re: Reading D-Bus messages, Eli Zaretskii, 2010/09/24
- Re: Reading D-Bus messages, Michael Albinus, 2010/09/24
- Re: Reading D-Bus messages, Jan Djärv, 2010/09/24
- Re: Reading D-Bus messages, Michael Albinus, 2010/09/24
- Re: Reading D-Bus messages, Eli Zaretskii, 2010/09/24
- Re: Reading D-Bus messages, Michael Albinus, 2010/09/24
- Re: Reading D-Bus messages, Jan Djärv, 2010/09/25
- Re: Reading D-Bus messages,
Michael Albinus <=
- Re: Reading D-Bus messages, Jan Djärv, 2010/09/25
- Re: Reading D-Bus messages, Michael Albinus, 2010/09/25
- Re: Reading D-Bus messages, Jan Djärv, 2010/09/26
- Re: Reading D-Bus messages, Ken Brown, 2010/09/26
- Re: Reading D-Bus messages, Michael Albinus, 2010/09/26
- Re: Reading D-Bus messages, Jan Djärv, 2010/09/26
- Re: Reading D-Bus messages, Michael Albinus, 2010/09/27
- Re: Reading D-Bus messages, Ken Brown, 2010/09/27
- Re: Reading D-Bus messages, Michael Albinus, 2010/09/27
- Re: Reading D-Bus messages, Ken Brown, 2010/09/27