Trouble with aspect ratio in multiple windows

I have an application capable of opening multiple Windows, each of them with an individual Context and viewer.

While i believed them to be totally disjoint, they show some odd behaviour when of different size:

When hovering the mouse over a currently not focussed window, the width and heigth of that window's drawing area snaps to the same area the window in focus has.

When the misaligned window is resized, it's drawing area snaps back to the intended format, but hovering the mouse over the other window makes this one loose it' aspect in turn.

I believe this might be caused by missing calls to OpenGL's MakeCurrent-function, but i am unsure how to call it appropriatly.

Does anyone of you share this problem, or has even a workaround?

Tilman Leune's picture

I've attached a screenshot.

Attachments: 
Tilman Leune's picture

I finally found what was wrong:
During the intialization of my Viewer, i need to pass

NULL as second parameter to v3d_view::SetWindow in order to have Setwindow generate a separate OGL Rendering context for each window.

myView->SetWindow(aWNTWindow, NULL, cbFunc, cbData);

The old mantra holds:

Do things right, and they'll work out!