If WindowServer stops working, for instance when it crashes, not only does everything on the display(s) freeze, but routing of input events such as clicks or taps also stops. For example, when you click on a window it’s WindowServer which determines which app owns it, and passes the event to that app to handle. Because WindowServer knows which app’s windows are where, and which are at the front, it also routes events to each app. With its central position in managing windows and compositing them, WindowServer is also responsible for handling multiple displays, and behaviours which stream or extract parts or all of a display image, such as taking screenshots. That composite is then sent through the graphics driver to graphics output hardware. WindowServer then positions them according to their current locations on the whole display, and produces a layered composite, as you’ll see in a screenshot taken with Command-Shift-3. Using Command-Shift-4, then pressing the Space Bar and selecting a window, you’ll get a shot of an individual window, as shown in the examples below. ![]() You can get a good idea of what WindowServer does using screenshots. ![]() distnoted is a system message notification service, and MTLCompilerService manages accelerated graphics commands in Metal. They’re part of a group of interconnected services which handle window management, the compositing of windows into the display image, and event-routing for apps. You may also notice that it’s one of a small group of processes including distnoted and MTLCompilerService which have their own user, _windowserver. Open Activity Monitor, and you’ll see WindowServer close to the top of the lists of CPU, Memory and Energy users, and when it’s getting into trouble that’s always a good place to check what’s up with it. ![]() Without WindowServer there can be no GUI. From the moment the login window appears during startup, WindowServer is hard at work, and remains so until you shut your Mac down. To assemble all those into what you see on the display, it takes the master compositor, WindowServer. In macOS, apps including the Finder manage the contents of their own windows.
0 Comments
Leave a Reply. |