2006-11-07 Bill Haneman <bill.haneman@sun.com>
+ Patches from Padraig O'Briain for bugs #361386 and #369377.
+
+ * registryd/registry.c:
+ (struct NotifyContext): Change the e_out
+ member from an Accessibility_Event struct to a pointer to
+ struct.
+ (notify_listeners_cb): Modify to use the new struct definition above.
+ Allows use of ORBit_copy_value instead of CORBA_any__copy.
+
+ * registryd/deviceeventcontroller.c:
+ (spi_dec_button_update_and_emit): Free the event's any_data
+ after emission.
+ (spi_dec_mouse_check):Free the event details any struct
+ after emission.
+ (spi_device_event_controller_forward_mouse_event): Free any.
+ (spi_device_event_controller_forward_key_event): Ditto.
+
+2006-11-07 Bill Haneman <bill.haneman@sun.com>
+
* configure.in: Uprev/release 1.7.13 for gnome 2.17.2.
Don't require gtk+ and gail for building most of at-spi
including libspi.
}
else
spi_dec_set_unlatch_pending (controller, mask_return);
+
+ CORBA_free (e.any_data._value);
}
return TRUE;
}
int *x, int *y, gboolean *moved)
{
Accessibility_Event e;
+ Accessibility_EventDetails *details;
CORBA_Environment ev;
int win_x_return,win_y_return;
unsigned int mask_return;
Accessibility_Registry_notifyEvent (BONOBO_OBJREF (controller->registry),
&e,
&ev);
+ details = e.any_data._value;
+ CORBA_free (details);
e.type = "mouse:rel";
e.source = BONOBO_OBJREF (controller->registry->desktop);
e.detail1 = *x - last_mouse_pos->x;
Accessibility_Registry_notifyEvent (BONOBO_OBJREF (controller->registry),
&e,
&ev);
+ details = e.any_data._value;
+ CORBA_free (details);
*moved = True;
}
else
Accessibility_Registry_notifyEvent (BONOBO_OBJREF (controller->registry),
&e,
&ev);
+ CORBA_free (e.any_data._value);
}
static gboolean
Accessibility_Registry_notifyEvent (BONOBO_OBJREF (controller->registry),
&e,
&ev);
+ CORBA_free (e.any_data._value);
}
xkb_mod_unlatch_occurred = (xevent->type == ButtonPress ||
{
CORBA_Environment ev;
Accessibility_DeviceEvent key_event;
+ gboolean ret;
g_assert (event->type == KeyPress || event->type == KeyRelease);
spi_controller_update_key_grabs (controller, &key_event);
/* relay to listeners, and decide whether to consume it or not */
- return spi_controller_notify_keylisteners (controller, &key_event, CORBA_TRUE, &ev);
+ ret = spi_controller_notify_keylisteners (controller, &key_event, CORBA_TRUE, &ev);
+ CORBA_free(key_event.event_string);
+ return ret;
}
SpiDEController *
CORBA_Environment *ev;
Bonobo_Unknown source;
EventTypeStruct etype;
- Accessibility_Event e_out;
+ Accessibility_Event *e_out;
} NotifyContext;
static SpiReEntrantContinue
}
#endif
- ctx->e_out.source = ctx->source;
+ ctx->e_out->source = ctx->source;
if ((*list) && (*list)->data == ls)
{
Accessibility_EventListener_notifyEvent (
- (Accessibility_EventListener) ls->listener, &ctx->e_out, ctx->ev);
+ (Accessibility_EventListener) ls->listener, ctx->e_out, ctx->ev);
if (ctx->ev->_major != CORBA_NO_EXCEPTION)
{
DBG (1, g_warning ("Accessibility app error: exception during "
new_ctx->etype.major = ctx->etype.major;
new_ctx->etype.minor = ctx->etype.minor;
new_ctx->etype.detail = ctx->etype.detail;
- new_ctx->e_out.type = CORBA_string_dup (ctx->e_out.type);
- new_ctx->e_out.source = ctx->e_out.source;
- new_ctx->e_out.detail1 = ctx->e_out.detail1;
- new_ctx->e_out.detail2 = ctx->e_out.detail2;
- CORBA_any__copy (&(new_ctx->e_out.any_data), &(ctx->e_out.any_data));
+ new_ctx->e_out = ORBit_copy_value (ctx->e_out, TC_Accessibility_Event);
return new_ctx;
}
bonobo_object_release_unref (q_ctx->source, NULL);
}
CORBA_free ((void *)q_ctx->etype.event_name);
- CORBA_free ((void *)q_ctx->e_out.type);
- if (q_ctx->e_out.any_data._type != TC_null)
- CORBA_free ((void *)q_ctx->e_out.any_data._value);
+ CORBA_free (q_ctx->e_out);
g_free (q_ctx);
}
registry->is_queueing = FALSE;
static gboolean
registry_queue_event (SpiRegistry *registry, NotifyContext *ctx)
{
- NotifyContext *q_ctx = registry_clone_notify_context (ctx);
#ifdef SPI_QUEUE_DEBUG
- if (q_ctx->etype.type_cat != ETYPE_MOUSE)
- fprintf (stderr, "push! %s %p\n", q_ctx->etype.event_name, q_ctx);
+ if (ctx->etype.type_cat != ETYPE_MOUSE)
+ fprintf (stderr, "push! %s %p\n", ctx->etype.event_name, ctx);
#endif
if (registry->is_queueing)
{
+ NotifyContext *q_ctx = registry_clone_notify_context (ctx);
+
g_queue_push_head (registry->deferred_event_queue, q_ctx);
return FALSE;
}
else
{
- bonobo_object_release_unref (q_ctx->source, NULL);
- CORBA_free ((void *)q_ctx->etype.event_name);
- CORBA_free ((void *)q_ctx->e_out.type);
- if (q_ctx->e_out.any_data._type != TC_null)
- CORBA_free ((void *)q_ctx->e_out.any_data._value);
- g_free (q_ctx);
return TRUE;
}
}
parse_event_type (&ctx.etype, e->type);
ctx.ev = ev;
- ctx.e_out = *e;
+ ctx.e_out = (Accessibility_Event *)e;
ctx.source = e->source;
#ifdef SPI_QUEUE_DEBUG