linux: Fixes a racy crash by key input at termination.

It seems that it's possible that GDK events happen while we're going
to unregister the GDK event handler, and the code must be thread-safe.
(A gpointer |data| in the old code seems pointing to the deleted object.)

This CL removes use of |data| pointer and makes the code thread-safe
without adding any mutex.


Review URL:

Cr-Commit-Position: refs/heads/master@{#297112}
2 files changed