From bd3da291ccbb21cdab7cae3af1372231e9019337 Mon Sep 17 00:00:00 2001 From: Alexander Gottwald Date: Sun, 14 Mar 2004 15:27:16 +0000 Subject: [PATCH] support multiwindow mode (harold pointed me to the correct structures) --- hw/xwin/winpriv.c | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/hw/xwin/winpriv.c b/hw/xwin/winpriv.c index c2f116d93..0af777656 100644 --- a/hw/xwin/winpriv.c +++ b/hw/xwin/winpriv.c @@ -1,5 +1,6 @@ #include "win.h" #include "winpriv.h" +#include "winwindow.h" extern void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo) @@ -17,6 +18,7 @@ extern void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo) }; ScreenPtr pScreen = pWin->drawable.pScreen; winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen); + winScreenInfoPtr pScreenInfo = NULL; ErrorF("winGetWindowInfo: returning a window\n"); @@ -24,19 +26,50 @@ extern void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo) pWinInfo->hrgn = NULL; pWinInfo->rect = rect; - if (pWinScreen == NULL) + if (pWinScreen == NULL) return; + pScreenInfo = pWinScreen->pScreenInfo; pWinInfo->hwnd = pWinScreen->hwndScreen; +#ifdef XWIN_MULTIWINDOW + if (pWinScreen->pScreenInfo->fMultiWindow) + { + winWindowPriv(pWin); + + ErrorF("winGetWindowInfo: multiwindow\n"); + + if (pWinPriv == NULL) + { + ErrorF("winGetWindowInfo: window has no privates\n"); + return; + } + + RECT rect = { + 0, + 0, + pWin->drawable.width, + pWin->drawable.height + }; + + if (pWinPriv->hWnd != NULL) + pWinInfo->hwnd = pWinPriv->hWnd; + pWinInfo->hrgn = NULL; + pWinInfo->rect = rect; + + return; + } +#endif #ifdef XWIN_MULTIWINDOWEXTWM - /* if (multiwindow) */ + if (pWinScreen->pScreenInfo->fMWExtWM) { win32RootlessWindowPtr pRLWinPriv = (win32RootlessWindowPtr) RootlessFrameForWindow (pWin, FALSE); + + ErrorF("winGetWindowInfo: multiwindow extwm\n"); if (pRLWinPriv == NULL) { - ErrorF("winGetWindowInfo: window is not rootless\n"); + ErrorF("winGetWindowInfo: window has no privates\n"); return; } @@ -47,12 +80,11 @@ extern void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo) pWin->drawable.height }; - pWinInfo->hwnd = pRLWinPriv->hWnd; + if (pRLWinPriv->hWnd != NULL) + pWinInfo->hwnd = pRLWinPriv->hWnd; pWinInfo->hrgn = NULL; pWinInfo->rect = rect; - ErrorF("winGetWindowInfo: window is rootless\n"); - return; } #endif