Look at screenshot. Active gnome-terminal in foreground, inactive firefox in background.
Top panel show icon and menu for gnome-terminal. So I assume window control buttons in top left corner also will affect foreground gnome-terminal window. But if I click close button in top left corner, firefox will be closed.
So I think window control buttons in panel should be hidden, where active non-maximized window in foreground.
Look at screenshot. Active gnome-terminal in foreground, inactive firefox in background. Top panel show icon and menu for gnome-terminal. So I assume window control buttons in top left corner also will affect foreground gnome-terminal window. But if I click close button in top left corner, firefox will be closed.
So I think window control buttons in panel should be hidden, where active non-maximized window in foreground.