johnmattsson's picture

GameWindow Width and Height properties are inconsistent

Project:The Open Toolkit library
Version:1.0-beta-3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

There was a forum thread about this issue and the Fiddler wrote:

"The Width and Height parameters reflect to the whole window, not just the client area. The ability to set the client area directly has been added to OpenTK 0.9.9: use the ClientRectangle and ClientSize properties."
"Closing issues fixed in 0.9.9-2"

But I get similar issues in 1.0 beta 2. (I'm using Windows 7 x64). The Width and Height properties seems to be inconsistently treated as both Size and ClientSize.
- get returns ClientSize, but set seems to affect Size.....
- if Width is set, Height will also be set (would not be an issue if get/set was consistent)

These three statements gives equivalent results:

Width = Width;
Height = Height;
Size = ClientSize;

the GameWindow shrinks...

/John


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

#1

Version:1.0-beta-2» 0.9.x-dev
Status:open» fixed

Thanks for the bug report, fixed in r2565.

the Fiddler's picture

#2

Version:0.9.x-dev» 1.0-beta-3
Status:fixed» closed

Closing issues fixed in opentk-1.0-beta-3.