Problem with IME support

I have been trying to see how IME support was working in my game using
Anthy (for those that don’t know, it’s like the Japanese IME for
Linux). I found out the two following issues:

  1. When switching input methods while in fullscreen, the window will
    minimize. This is probably because there’s a pop-up showing all IMEs
    available.

  2. For whatever reason it’s completely ignoring the IME part and
    sending all keystrokes straight to the program, so instead of e.g.
    "???" I get “ohayougozaimasu”.

Any ideas?