All WindowServer connections in the WebContent process should be closed before denying access to the WindowServer, otherwise calling CGSSetDenyWindowServerConnections(true) will fail. Currently, there are no open WindowServer connections at this point, but this might change in the future. We should call CGSShutdownServerConnections() before calling CGSSetDenyWindowServerConnections(true) to make sure WindowServer connections are always successfully denied. Thanks to Alex Gaynor at Mozilla (firstname.lastname@example.org) for identifying this issue.
Created attachment 346066 [details]
Thanks for reviewing!
Just wondering if you're still planning on landing this patch, and if this might prevent error output like the following:
FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL