Problem with Game Window

Hi,
I’m developing a blender program using the game engine. Unfortunatly I use the bpy library, for this reason I can’t use the blenderplayer and I have to start my game with “blender.exe”. I start the game Engine with “autostart” option, in full screen mode, by clicking directly on the .blend file
The game start in full screen and everything goes well, but if I try to resize my window the viewport remain the same and the image is “cutted”.
Then I’m trying to get the Window size into game engine, in order to change the viewport by python code, but it doesn’t work.
Using…

width = Rasterizer.getWindowWidth()
height = Rasterizer.getWindowHeight()

or

width = bge.render.getWindowWidth()
height = bge.render.getWindowHeight()

the dimensions returned by these functions always correspond to the starting dimension of the window, also if I resize the window manually.

have you got any suggestions??
Thank you in advance

Alessandro

This is because the BGE runs inside Blender. While the BGE is running the Blender GUI is blocked (incl. Window Resize, incl. GUI refresh). I guess this is to avoid performance issues because of the running Blender GUI.

Thanks
But, there is a way to obtain the actual window size? Also if a user reduce the visible part of the window.
If I could obtain it is it possible to set the size of the viewport and everything works.

Any other suggestion to avoid this problem?

Thank you?
I’m going crazy