Have DoAction send the reply message *before* invoking atk
authorMike Gorse <mgorse@novell.com>
Mon, 5 Mar 2012 23:20:19 +0000 (17:20 -0600)
committerMike Gorse <mgorse@novell.com>
Mon, 5 Mar 2012 23:54:05 +0000 (17:54 -0600)
commita110d6bf5aac4a11541521c568d9a8f85aecca05
tree9af2558d9d4e5f3a1460e84527c36497719e519b
parentcc1ba3203a74c36a41a21e8dad1fb3ccc338d62a
Have DoAction send the reply message *before* invoking atk

In the past, a gtk button's do_action handler added an idle to invoke
the button and then returned, but now the idle has been removed, and the
do_action call activates the button directly, meaning that, if the
button invokes a dialogue, then atk_action_do_action will not return
until the dialog closes. So, to be safe, we need to send a reply before
invoking atk. This means that atk's return value gets ignored, although
it was somewhat meaningless in gtk's case anyhow. This required that
droute's behavior be changed so that, if a handler does not return a
message, droute will now assume that the handler already sent a reply,
rather than synthesizing a default empty reply. Thus, handlers are now
required to return a value DBusMessage.

Perhaps the API should really be asynchronous, with a callback to be
invoked when the action finishes.
atk-adaptor/adaptors/action-adaptor.c
droute/droute.c