DXGL r108 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r107‎ | r108 | r109 >
Date:22:41, 29 February 2012
Author:admin
Status:new
Tags:
Comment:
Prevent overlay window from stealing focus. Fixes input for Allegro games.
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)

Diff [purge]

Index: ddraw/glRenderer.cpp
@@ -483,6 +483,7 @@
484484 hRenderWnd = CreateWindowA("DXGLRenderWindow","Renderer",WS_CHILD|WS_VISIBLE,0,0,rectRender.right - rectRender.left,
485485 rectRender.bottom - rectRender.top,hWnd,NULL,wndclass.hInstance,this);
486486 hasHWnd = true;
 487+ SetWindowPos(hRenderWnd,HWND_TOP,0,0,rectRender.right,rectRender.bottom,SWP_SHOWWINDOW);
487488 }
488489 else
489490 {
@@ -491,8 +492,8 @@
492493 hRenderWnd = CreateWindowExA(WS_EX_TOOLWINDOW|WS_EX_LAYERED|WS_EX_TRANSPARENT|WS_EX_TOPMOST,
493494 "DXGLRenderWindow","Renderer",WS_POPUP,0,0,width,height,0,0,NULL,this);
494495 hasHWnd = false;
 496+ SetWindowPos(hRenderWnd,HWND_TOP,0,0,rectRender.right,rectRender.bottom,SWP_SHOWWINDOW|SWP_NOACTIVATE);
495497 }
496 - SetWindowPos(hRenderWnd,HWND_TOP,0,0,rectRender.right,rectRender.bottom,SWP_SHOWWINDOW);
497498 if(hRC)
498499 {
499500 wglMakeCurrent(NULL,NULL);