With the latest macOS, the tab feature introduced,
my app needs to support this.
Here is the thing, I don't know how to distinguish the closing event like the title I said.
What I expect is when I click the "x" on the left of a tabbed window, it should close this single tab window.
And when I click the "x" on the left top of the whole window, it should close all the tabbed window in this main window.
I have implemented these two methods, when I click the "x" on the left top if the whole window, it can close all tabbed window, and when I didn't merge them into a window, I can close it one by one.
But when I merge them into a window and click "x" on the left of each tab window. it still close all the tabbed window. So I think the root cause is I can't tell the tab closing and window closing event.
Any idea? Thanks