The OpenGL-on-Metal drivers used on these machines don't support CGLSetFullScreenOnDisplay, so we need to disable it on those machines. This also applies when running a x86_64 app through Rosetta 2, hence the sysctlbyname check.
Furthermore, we need to set the appropriate shielding level, which need not be `NSMainMenuWindowLevel+1`.
Fixes#1316
Co-authored-by: LD <laurent.deru@gmail.com>
Otherwise any multithreaded application is dropping frames like mad, since the packets for different frames may be added to the same queue at roughly the same time.
This improves performance of PStats client when a lot of data is being sent per frame.
Also increase the value of pstats-max-queue-size, since otherwise we're constantly dropping frames when using multiple threads.
It creates a clock skew in the PStats timing information that cannot be corrected for in the server. If we want to bring this back, we should either have a global `pause()` and `resume()` (so we can properly pause collection in the meantime, and have a time to reset to, but we'd need to think about how to handle threading) or we should add a `drop_frame()` to drop the current frame. If we must bring it back in its current form, then we need to communicate the clock reset to the server, so that it can properly take it into account.
This lets the window manager know when a program has finished launching, to stop showing a spinning cursor
Can be disabled with `x-send-startup-notification false`
Enabled with `pstats-python-profiler 1`, requires recent version of PStats server.
Currently, it is limited to the main thread only. Support for other threads may be added at a later date.
Currently, the client doesn't send nested start/stop pairs, but there is no good reason not to handle this case in the server, and in some cases it is useful to send them (I will soon make changes on master to take advantage of this).
Client version 3.1 indicates that the client may send nested start/stop pairs.
Previously, forward stages would be uninitialized, resulting in cryptic errors with ahead-of-time preparation (although arguably ahead-of-time preparation is a bug in and of itself)
When copying a dirty cycler, don't use two separate lock-grabbing calls to add to the clean set, then remove from clean set and move to dirty set
Short-cut the cdata copy loop for the common case of only 1 stage
Reduces code duplication, makes it possible to inherit bug fixes from the base class, and also handles resizes more efficiently now (only when this would actually require a framebuffer reallocation).