I just noticed that problem yesterday with emacs-gtk and I want to point
out that the feature/pgtk (Pure GTK) branch of emacs does not seem to be
affected.
This new emacs-pgtk is a true GTK3 application unlike the old emacs-gtk
which is an X11 app using GTK widgets (see
https://emacshorrors.com/posts/psa-emacs-is-not-a-proper-gtk-application.html).
The branch can be found in
http://git.savannah.gnu.org/cgit/emacs.git/log/?h=feature/pgtk or
https://github.com/emacs-mirror/emacs/tree/feature/pgtk
As far as I can tell, this new backend is working fine. You may have to
update your .emacs if it relies on some X11 specific features (e.g. such
as comparing window-system to 'x). Apart from fixing a few integration
issues such as this one, another advantage of a pure gtk build is that
it can run as a native Wayland application.
Hopefully, it will be officially included soon in emacs.