emacinnes's picture

GameWindow X, Y position not correctly updating

Project:The Open Toolkit library
Category:bug report

The GameWindow X and Y position is not updating correctly on the current SVN build, or in the last binary download.

I create the GameWindow, and then occasionally need to move it (i.e. toggling between fullscreen and Windowed), and need to reset the X, Y position, but it doens't move.

Also, the old height/width mismatch issue between clientheight and window height is back.


Comment viewing options

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


  • Which operating system is this?
  • When you say the position is not updating correctly, do you mean that you receive incorrect values or that the values are not updated at all?
  • Finally, which SVN revision and branch are you testing? (trunk/1.0/other?)
emacinnes's picture


This is on Windows 7 64bit. The X, Y don't update at all. The window defaults to the center of the screen and that's it. This is on the latest SVN code from saturday, rev. 2600.

the Fiddler's picture



This is on the latest SVN code from saturday, rev. 2600.

Which branch? X and Y seem to be updating correctly here (Win7/64bit, 1.0 branch, r2600. Haven't tested trunk yet).

Is the issue reproducible using the GameWindowStates example? (Examples.exe -> OpenTK -> GameWindowStates, please use SVN r2603+ of "branches/1.0", which displays more GameWindow properties).

emacinnes's picture


Yes, it's reproducable (but does something weird with the width/height).

To reproduce, in the GamewindowStates.cs example, simply add (line 55):

case Key.Number8: X=X-32; break;

This logic, which should, in theory, move the window left, instead increases the Width, every time I press 8.

This is in Branches.

The earlier issue was occuring on Trunk.

the Fiddler's picture


Version:1.x-dev» 1.0-beta-2
Status:open» confirmed

Ok, I can reproduce this, investigating.

the Fiddler's picture


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

Thanks, fixed in r2607. The issue was that the X and Y properties were bound to the client rectangle rather than the actual window bounds as they should be.

emacinnes's picture


Done! Problem solved! I've tested it in GameWindowStates and in Icarus and it's all good, thanks!

the Fiddler's picture


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

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