If we want to add some platform-specific code, we could also add it to the gtk-mac-integration library. Under normal conditions such a fix could be applied upstream but with the gtk-osx maintainer's attitude:
https://bugzilla.gnome.org/show_bug.cgi?id=793015
I'm not going to do that and we'd have to use a patched version of gtk-mac-integration. We already have to patch it anyway by
https://github.com/geany/geany-osx/blob/master/patches/01-gtk_mac_integratio...
because the gtk-osx project maintainer refuses to accept there's a problem in the library and rejects submitted patches:
https://bugzilla.gnome.org/show_bug.cgi?id=744596
(When I reported the problem, he closed the bug report saying the problem doesn't exist. When I re-opened the bug and added more details, he closed it again saying we're doing it wrong. Then I re-opened it again because what we are doing is completely legal code after which he rejected the patches. The guy is a joy to work with.)
So since we are patching the library anyway, we can add more patches there and do a similar thing like Chromium. Still it would be good to know first how to reproduce the problem and see if such a patch helps.