Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 1184 by owtaylor: ibus loses timestamps for key events
http://code.google.com/p/ibus/issues/detail?id=1184

Every time that ibus gets a key event from GDK (either with a key snooper, or via the GtkIMContext.filter_keypress() mechanism, it:

 Sends it to the daemon via D-Bus asynchronously
 When it gets an reply, synthesizes a new GdkEvent and puts it into the
   GDK event queue with gdk_event_put(), including
   IBUS_FORWARD_MASK = 1 << 25 in the state to prevent a loop.

This has a number of potential problems, but in particular because the timestamp is not included when the event is sent to the daemon and returned, the final key event that gets delivered will have a timestamp of GDK_CURRENT_TIME.

This creates some very subtle bugs; for example if you have IBus running and a keystroke is used to trigger launching an application, focus stealing prevention won't work right.

I assume similar problems occur when IBus is connected to other toolkits - timestamps are an important part of X events and can't just be dropped.

(Originally noticed when creating a ibus workaround for GNOME Shell - see the block comment in the patch attached to https://bugzilla.gnome.org/show_bug.cgi?id=621659)


--
You received this message because you are subscribed to the Google
Groups "ibus-devel" group.
iBus project web page: http://code.google.com/p/ibus/
iBus dev group: http://groups.google.com/group/ibus-devel?hl=en

回复