[IMQuartz] Get the GdkWindow from the NSKeyEvent.
Instead of from the IMContextQuartz's client window because the former is the event window where the text will be inserted. In some cases they're different and the text may be discarded (because the client window isn't editable) or misplaced. Fixes Bug 707945.
Showing with 6 additions and 5 deletions