Don't call XSetInputFocus because that can generate additional FocusIn events.
Attach a file by drag & drop or click to upload