GLUT Sub WIndows & Menus

Hi, trying to get to grips with GLUT and I’ve come across a bit of a problem.

I’m trying to set up an interface with four sub-windows in the style of 3D modelling software.
I can create the windows fine and give each one a different setup so they show the same world from different view points.

I’ve tried to add code to allow the user to change what type of view each window has by right clicking to bringing up a menu and choosing the type of view from the menu.

The problem I’ve come up against is that it doesn’t matter which window I right click in the only sub-window view that changes is the bottom right one. I presume this has something to do with window refreshes that end up with the last window drawn being the current one. Is there any way to find out which window triggered the menu ? Or would I have to maintain a set of menus for each window to do it that way ?