XFilterEvent usually filters KeyPress events according to input method. At this point the window is not mapped. The only events that we process are ConfigureNotify and MapNotify. They should not be filtered by input method.