Completion popup on non-default GdkDisplay freezes GtkFileChooserDialog
When opening a "Save file" built-in dialog on top of a window that is not using the default GdkDisplay, the file dialog will "freeze" when the entry completion popup tries to grab input.
Steps to reproduce (using testfilechooser.c):
- Compile and run the above reproducer (under any backend)
- Select some file (not directory) and wait for the completion popup
- Put text cursor in the end of the completion entry
- Press backspace
The console will print warnings like
_gtk_widget_captured_event: assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed
and the dialog becomes unresponsive.