When running a WebKitGTK+ application on macOS, every instance of the WebKitWebProcess makes a new dock icon. Is there a way to disable/fix this behavior?
Suggestions to use lsuielement (https://developer.apple.com/documentation/bundleresources/information_property_list/lsuielement) have not worked. It seems that WebKit itself and/or GTK is forcing each WebView widget to have a new application icon in the dock.
The Nyxt Browser folks worked this out with some help from WebKitGtk. You need to patch WebKitWebView so that it gets it NSApp
and calls [NSApp setActivationPolicy: NSApplicationActivationPolicyProhibited]
.
Nyxt spread that over several patches and a naked file write in their MacPorts Portfile, I've consolidated it into a single patch for Gtk-OSX.