summaryrefslogtreecommitdiff
path: root/hw/xwin/glx/winpriv.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xwin/glx/winpriv.c')
-rw-r--r--hw/xwin/glx/winpriv.c44
1 files changed, 43 insertions, 1 deletions
diff --git a/hw/xwin/glx/winpriv.c b/hw/xwin/glx/winpriv.c
index e6afbff01..4bb2b3104 100644
--- a/hw/xwin/glx/winpriv.c
+++ b/hw/xwin/glx/winpriv.c
@@ -14,6 +14,41 @@
void
winCreateWindowsWindow(WindowPtr pWin);
+static void
+winCreateWindowsWindowHierarchy(WindowPtr pWin)
+{
+ winWindowPriv(pWin);
+
+ winDebug("winCreateWindowsWindowHierarchy - pWin:%p XID:0x%x \n", pWin,
+ pWin->drawable.id);
+
+ if (!pWin)
+ return;
+
+ /* stop recursion at root window */
+ if (pWin == pWin->drawable.pScreen->root)
+ return;
+
+ /* recursively ensure parent window exists */
+ if (pWin->parent)
+ winCreateWindowsWindowHierarchy(pWin->parent);
+
+ /* ensure this window exists */
+ if (pWinPriv->hWnd == NULL) {
+ winCreateWindowsWindow(pWin);
+
+ /* ... and if it's already been mapped, make sure it's visible */
+ if (pWin->mapped) {
+ /* Display the window without activating it */
+ if (pWin->drawable.class != InputOnly)
+ ShowWindow(pWinPriv->hWnd, SW_SHOWNOACTIVATE);
+
+ /* Send first paint message */
+ UpdateWindow(pWinPriv->hWnd);
+ }
+ }
+}
+
/**
* Return size and handles of a window.
* If pWin is NULL, then the information for the root window is requested.
@@ -50,7 +85,7 @@ winGetWindowInfo(WindowPtr pWin)
}
if (pWinPriv->hWnd == NULL) {
- winCreateWindowsWindow(pWin);
+ winCreateWindowsWindowHierarchy(pWin);
winDebug("winGetWindowInfo: forcing window to exist\n");
}
@@ -119,3 +154,10 @@ winCheckScreenAiglxIsSupported(ScreenPtr pScreen)
return FALSE;
}
+
+void
+winSetScreenAiglxIsActive(ScreenPtr pScreen)
+{
+ winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen);
+ pWinScreen->fNativeGlActive = TRUE;
+}