Create a HWND if none created before returning window handle to GL layer

This commit is contained in:
Alexander Gottwald 2004-05-27 13:57:15 +00:00
parent 9afe489dff
commit ba6b8fe98f
3 changed files with 16 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2004-05-27 Alexander Gottwald <ago@freedesktop.org>
* winpriv.c: Create win32 window if not already created
* winmultiwindowwindow.c: Export winCreateWindowWindow
2004-05-27 Alexander Gottwald <ago@freedesktop.org>
* win.h: Allow CYGDEBUG to defined in the Makefile

View file

@ -48,7 +48,7 @@ extern void winSelectIcons(WindowPtr pWin, HICON *pIcon, HICON *pSmallIcon);
* Prototypes for local functions
*/
static void
void
winCreateWindowsWindow (WindowPtr pWin);
static void
@ -456,7 +456,7 @@ winRestackWindowMultiWindow (WindowPtr pWin, WindowPtr pOldNextSib)
* winCreateWindowsWindow - Create a Windows window associated with an X window
*/
static void
void
winCreateWindowsWindow (WindowPtr pWin)
{
int iX, iY;

View file

@ -8,6 +8,8 @@
#include "winpriv.h"
#include "winwindow.h"
void
winCreateWindowsWindow (WindowPtr pWin);
/**
* Return size and handles of a window.
* If pWin is NULL, then the information for the root window is requested.
@ -18,6 +20,8 @@ extern void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo)
if (pWinInfo == NULL)
return;
winDebug("%s:%d pWin=%p\n", __FUNCTION__, __LINE__, pWin);
/* a real window was requested */
if (pWin != NULL)
{
@ -60,7 +64,12 @@ extern void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo)
return;
}
if (pWinPriv->hWnd == NULL)
{
winCreateWindowsWindow(pWin);
}
if (pWinPriv->hWnd != NULL) {
/* copy size and window handle */
pWinInfo->rect = rect_extends;
pWinInfo->hwnd = pWinPriv->hWnd;