Welcome, Guest! Log In | Create Account

Changeset 1860

Show
Ignore:
Timestamp:
10/31/09 03:25:06 (2 months ago)
Author:
borrillis
Message:

Fixed issue with externaWindowHandle not being Form Window Handle

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Projects/Axiom/Platforms/Win32/Win32InputReader.cs

    r1802 r1860  
    3636using System; 
    3737using System.Collections.Generic; 
     38using SWF = System.Windows.Forms; 
    3839 
    3940using DX = SlimDX; 
     
    304305            winHandle = (IntPtr)window[ "WINDOW" ]; 
    305306 
     307            // Keyboard and mouse capture must use Form's handle not child 
     308            SWF.Control control = SWF.Control.FromHandle( winHandle ); 
     309            while ( control != null && control.Parent != null ) 
     310            { 
     311                control = control.Parent; 
     312            } 
     313            if ( control != null ) 
     314                winHandle = control.Handle; 
     315 
    306316            if ( dinput == null ) 
    307317            {