In case anyone else happens to have the same issue, I solved it by sticking
export GTK_IM_MODULE=xim