My application uses the keyboard to give focus to particular windows rather than clicking with the mouse. (I have a hand tremor that causes my mouse clicks to frequently miss the intended target.)
The application:
However, all the windows of the app being activated are brought forward, obscuring windows from other apps.
For example, if I am running two apps AppX and AppY with
That is the behavior I saw prior to Big Sur.
Since upgrading to Big Sur, however, when AppY is activated, both window Y1 and Y2 are brought forward.
The application:
uses the AppKit "Accessibility for macOS" API to select a window. It calls the AXUIElementSetAttributeValue function to set the attribute NSAccessibilityMainAttribute to make a window "main" and then
calls NSRunningApplication's method activateWithOptions: passing only NSApplicationActivateIgnoringOtherApps to activate the app associated with that window.
and the fact that I am not passing NSApplicationActivateAllWindows, I expect only the main window (which is also the key window) to move forward.By default, activation brings only the main and key windows forward. If you specify NSApplicationActivateAllWindows, all of the application's windows are brought forward.
However, all the windows of the app being activated are brought forward, obscuring windows from other apps.
For example, if I am running two apps AppX and AppY with
windows X1 and Y1 covering the left half of the screen and
windows X2 and Y2 covering the right half of the screen
That is the behavior I saw prior to Big Sur.
Since upgrading to Big Sur, however, when AppY is activated, both window Y1 and Y2 are brought forward.