Avoids races setting the window handle from the main thread. https://bugzilla.gnome.org/show_bug.cgi?id=745633