summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-05-27 13:57:15 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-05-27 13:57:15 +0000
commitba6b8fe98f12cdb28fa6c74307da26e342074d70 (patch)
treeee50a4c478cbb1e559729daef3f34170a4bcca66
parent9afe489dff85e9e13608e70625c05be8f68f4972 (diff)
Create a HWND if none created before returning window handle to GL layer
-rw-r--r--hw/xwin/ChangeLog5
-rw-r--r--hw/xwin/winmultiwindowwindow.c4
-rw-r--r--hw/xwin/winpriv.c9
3 files changed, 16 insertions, 2 deletions
diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog
index 8871430b5..8695f6c0f 100644
--- a/hw/xwin/ChangeLog
+++ b/hw/xwin/ChangeLog
@@ -1,5 +1,10 @@
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
* winwindow.h: Allow CYGWINDOWING_DEBUG to defined in the Makefile
diff --git a/hw/xwin/winmultiwindowwindow.c b/hw/xwin/winmultiwindowwindow.c
index 2d7ae1176..1c5e2fbbf 100644
--- a/hw/xwin/winmultiwindowwindow.c
+++ b/hw/xwin/winmultiwindowwindow.c
@@ -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;
diff --git a/hw/xwin/winpriv.c b/hw/xwin/winpriv.c
index 6aa3bc61a..20b0840f8 100644
--- a/hw/xwin/winpriv.c
+++ b/hw/xwin/winpriv.c
@@ -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;