mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-15 03:40:22 +01:00
support multiwindow mode (harold pointed me to the correct structures)
This commit is contained in:
parent
42cb5a5be8
commit
bd3da291cc
1 changed files with 38 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue