Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: Window cannot regain focus  (Read 1367 times)

alphageek

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 2
    • View Profile
Window cannot regain focus
« on: December 08, 2005, 08:51:14 PM »

Hi,

I have a problem where as soon as I start using OIS my app window cannot anymore regain focus.

So, I've got a dos-box window and my Ogre window and then after initialising OIS I cannot refocus the Ogre window (though it does not lose focus until I focus something else).

I tried fiddling with the DISCL values, but that did not help.

Any idea what might be happening? I am running win2k.

(BTW, thanks very much for OIS - it is excellent).
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Window cannot regain focus
« Reply #1 on: December 09, 2005, 09:14:37 AM »

How does the OIS Ogre demo and OIS Console demo included perform? I have tested alt tabbing there and both regain focus fine. In your app, are you using startRendering? if not, make sure you have a Win32 Message pump to pump messages into Ogre's Winproc... Or, you could also try the GLX/Win32 patch I submitted to Ogre's patch tracker and use the PlatformManager::messagePump(RenderWindow *) method to handle the OS specific message Pump - http://www.ogre3d.org/phpBB2/viewtopic.php?t=15608&highlight=
Logged

alphageek

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 2
    • View Profile
Window cannot regain focus
« Reply #2 on: December 09, 2005, 03:42:58 PM »

Your patch works a treat.

Thanks PJ!
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Window cannot regain focus
« Reply #3 on: December 09, 2005, 03:48:08 PM »

Glad that it worked for you  :D
Logged