[compiz] DBus setting options broken

David Reveman davidr at novell.com
Tue Jan 2 18:40:37 PST 2007


On Tue, 2007-01-02 at 19:12 -0600, Travis Watkins wrote:
> On 1/2/07, David Reveman <davidr at novell.com> wrote:
> > I've fixed the problem with an error being generated when setting an
> > option to the existing value. Dbus plugin is not sending any reply
> > messages so it's supposed to time out unless a error is generated.
> 
> You mean the timeout that causes my app to lock up for seconds or
> makes me use threads is by design? :/

hm, after reading some dbus docs I realized that we should always be
sending a reply message to method calls unless the no_reply flag is set.
I wasn't aware of this... it's fixed now though.

Nevertheless, even though it should work now, I wouldn't necessarily
make synchronous method calls if I were you. You don't have to use
threads to do asynchronous method calls. Whatever dbus bindings you're
using should have a non-blocking way to send messages. I wouldn't want
to block for each method call if I were setting a large amount of
options.

> 
> > I'm hoping that this is fixed now, not sure though. Let me know how it
> > works.
> 
> Now it seems like setting string lists results in the list getting emptied.
> 

Seems to be working for me. Here's what I get when I do some testing
using dbus-send. Do you not get the same results?

$ dbus-send --type=method_call --print-reply --dest=org.freedesktop.compiz /org/freedesktop/compiz/wobbly/screen0/map_window_types org.freedesktop.compiz.get
method return sender=:1.22 -> dest=:1.40
$ dbus-send --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz/wobbly/screen0/map_window_types org.freedesktop.compiz.set string:'Normal' string:'Unknown'
$ dbus-send --type=method_call --print-reply --dest=org.freedesktop.compiz /org/freedesktop/compiz/wobbly/screen0/map_window_types org.freedesktop.compiz.get
method return sender=:1.22 -> dest=:1.42
   string "Normal"
   string "Unknown"
$ dbus-send --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz/wobbly/screen0/map_window_types org.freedesktop.compiz.set
$ dbus-send --type=method_call --print-reply --dest=org.freedesktop.compiz /org/freedesktop/compiz/wobbly/screen0/map_window_types org.freedesktop.compiz.get
method return sender=:1.22 -> dest=:1.44

-David



More information about the compiz mailing list