diff options
author | marha <marha@users.sourceforge.net> | 2010-04-28 06:39:01 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-04-28 06:39:01 +0000 |
commit | 31154bcb2328faea20b9860eeb3b52766062d273 (patch) | |
tree | f3e0b517cecc8a6cdd560f4c6316d74caae236f9 /xorg-server/hw/xwin/glx/winpriv.c | |
parent | 929c7e1e824590c2f8bd47135f96c98a34027dd5 (diff) | |
download | vcxsrv-31154bcb2328faea20b9860eeb3b52766062d273.tar.gz vcxsrv-31154bcb2328faea20b9860eeb3b52766062d273.tar.bz2 vcxsrv-31154bcb2328faea20b9860eeb3b52766062d273.zip |
git update 28/4/2010
Diffstat (limited to 'xorg-server/hw/xwin/glx/winpriv.c')
-rw-r--r-- | xorg-server/hw/xwin/glx/winpriv.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/xorg-server/hw/xwin/glx/winpriv.c b/xorg-server/hw/xwin/glx/winpriv.c index 3260ca95c..a35392b26 100644 --- a/xorg-server/hw/xwin/glx/winpriv.c +++ b/xorg-server/hw/xwin/glx/winpriv.c @@ -17,13 +17,9 @@ winCreateWindowsWindow (WindowPtr pWin); * Return size and handles of a window. * If pWin is NULL, then the information for the root window is requested. */ -void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo) +HWND winGetWindowInfo(WindowPtr pWin) { - /* Sanity check */ - if (pWinInfo == NULL) - return; - - winDebug("%s:%d pWin=%p\n", __FUNCTION__, __LINE__, pWin); + winDebug("%s: pWin=%p\n", __FUNCTION__, pWin); /* a real window was requested */ if (pWin != NULL) @@ -32,14 +28,15 @@ void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo) ScreenPtr pScreen = pWin->drawable.pScreen; winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen); winScreenInfoPtr pScreenInfo = NULL; + HWND hwnd = NULL; if (pWinScreen == NULL) { ErrorF("winGetWindowInfo: screen has no privates\n"); - return; + return NULL; } - pWinInfo->hwnd = pWinScreen->hwndScreen; + hwnd = pWinScreen->hwndScreen; pScreenInfo = pWinScreen->pScreenInfo; #ifdef XWIN_MULTIWINDOW @@ -51,7 +48,7 @@ void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo) if (pWinPriv == NULL) { ErrorF("winGetWindowInfo: window has no privates\n"); - return; + return hwnd; } if (pWinPriv->hWnd == NULL) @@ -63,10 +60,10 @@ void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo) if (pWinPriv->hWnd != NULL) { /* copy window handle */ - pWinInfo->hwnd = pWinPriv->hWnd; + hwnd = pWinPriv->hWnd; } - return; + return hwnd; } #endif #ifdef XWIN_MULTIWINDOWEXTWM @@ -78,15 +75,15 @@ void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo) if (pRLWinPriv == NULL) { ErrorF("winGetWindowInfo: window has no privates\n"); - return; + return hwnd; } if (pRLWinPriv->hWnd != NULL) { /* copy window handle */ - pWinInfo->hwnd = pRLWinPriv->hWnd; + hwnd = pRLWinPriv->hWnd; } - return; + return hwnd; } #endif } @@ -95,19 +92,18 @@ void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo) ScreenPtr pScreen = g_ScreenInfo[0].pScreen; winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen); - pWinInfo->hwnd = NULL; - if (pWinScreen == NULL) { ErrorF("winGetWindowInfo: screen has no privates\n"); - return; + return NULL; } ErrorF("winGetWindowInfo: returning root window\n"); - pWinInfo->hwnd = pWinScreen->hwndScreen; + return pWinScreen->hwndScreen; } - return; + + return NULL; } Bool |