The old way of checking for focus loss caused GTK to be unable to even open the combobox. This way checks for the event sent when the list closes and uses that to close the grid editor. Fixes https://gitlab.com/kicad/code/kicad/issues/4617
Fixes: lp:1102168 * https://bugs.launchpad.net/kicad/+bug/1102168 Fixes: lp:1779913 * https://bugs.launchpad.net/kicad/+bug/1779913 (cherry picked from commit 83781ab)