The return value of XGrabKeyboard() wasn't actually being assigned to the 'result' variable so we didn't notice when grabbing the keyboard failed. https://bugzilla.gnome.org/show_bug.cgi?id=596343