Comment 4 for bug 1174342

Revision history for this message
Oliver Sauder (sao) wrote :

This has been a really annoying bug - main issue is that GTK has issues with interleaving of XEvent and Gdk.Events.

In general is the grabbing of keys quite a bit of a problem as different processes are trying to get their shortcuts registered which causes all sorts of issues and race conditions.

After doing some research I have found out that GNOME has seen this problem and solved it by providing a Dbus Service org.gnome.Shell where it is possible to grab accelerators. Unity followed suit and implemented the same Dbus service in their Compiz Unity plugin providing same functionality.

This service has the advantage to handle all grabbing of keys in a single process so no race conditions can happen - and it is also a external service so there won't be an issues with conflicting events within application itself such as Diodon.

I have implemented this service for grabbing keys which is available for testing in the current daily ppa. This fix will at this point only work for Unity and GNOME desktop environments - the code falls back to a legacy mode for all other DEs as there such a service is not available - so this problem will remain there.