migueltk's picture

How to get the window gain focus and rise to the top level?

Hello, ...
Currently I am using the 1.0 branch OpenTK (OpenTK.dll and run the application window is not displayed in the foreground of the screen, both in debug mode and release mode.

A greeting ...


Comment viewing options

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

I committed a fix for this bug recently, but I have a feeling it doesn't always work.

Are you using the latest SVN revision? (should be r2600 or so). If the bug still happens with that, what window settings are you using? (i.e. WindowState.Normal/WindowBorder.Resizable or something else?)

migueltk's picture

I upgraded from revision 2501 to revision 2600 of SVN, the problem persists. The window "GameWindow " is created in a separate assembly to executable " *. exe " I have found that if you set the executable as a console application, the application window is in the foreground without problems, but if you set the executable as an application for windows, the window does not appear in the foreground.

On windows and linux (ubuntu) if I launch the application from a terminal window appears smooth.

The same code works fine with OpenTK 0.9.8-3.

Data from the graphics card:
Windows (operating system: Windows 7 32-bit):
Graphics card vendor: ATI Technologies Inc.
Graphics Card Model: ATI Radeon HD 3870
OpenGL Version: 2.1.8787

Linux (Ubuntu 64-bit):
Graphics card vendor: Advanced Micro Devices, Inc.
Model Graphics Card: Mesa DRI R600 (RV670 9501) 20090101 TCL DRI2
OpenGL Version: 1.5 Mesa 7.7.1-DEVEL

the Fiddler's picture

Ok, two more questions so I can reproduce this:

  • How are you launching the application? (i.e. simply by double-clicking or through code with Process.Start()?)
  • Does this issue also occur on Ubuntu?

The fact that this doesn't occur on 0.9.8-3 helps narrow down the problem area a lot.

migueltk's picture

I think it's best to check it out yourself, I advance the publication of the project that was working on I see the problem described above. The source code is in the direction http://sites.google.com/site/bitiopia/Home/trixion3d

Please, if you have free time, compile it and tell me the result.

Regards, ...

the Fiddler's picture

Ok, I've committed a change that should finally fix the issue completely. It is in SVN r2601 of the 1.0 branch and will be moved to trunk and the next binary release, shortly.

migueltk's picture

Cool, I tried the 1.0 branch SVN r2608 and all is well.

Good work, thanks ...