diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h index 1e236bb9d..fddbc2c36 100644 --- a/miext/rootless/rootlessCommon.h +++ b/miext/rootless/rootlessCommon.h @@ -91,7 +91,6 @@ typedef struct _RootlessScreenRec { RestackWindowProcPtr RestackWindow; ReparentWindowProcPtr ReparentWindow; ChangeBorderWidthProcPtr ChangeBorderWidth; - PositionWindowProcPtr PositionWindow; ChangeWindowAttributesProcPtr ChangeWindowAttributes; PaintWindowProcPtr PaintWindow; diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c index 9d778249b..f802fec2b 100644 --- a/miext/rootless/rootlessScreen.c +++ b/miext/rootless/rootlessScreen.c @@ -651,6 +651,7 @@ RootlessWrap(ScreenPtr pScreen) RootlessScreenRec *s = SCREENREC(pScreen); dixScreenHookWindowDestroy(pScreen, RootlessWindowDestroy); + dixScreenHookWindowPosition(pScreen, RootlessWindowPosition); #define WRAP(a) \ if (pScreen->a) { \ @@ -672,7 +673,6 @@ RootlessWrap(ScreenPtr pScreen) WRAP(RealizeWindow); WRAP(UnrealizeWindow); WRAP(MoveWindow); - WRAP(PositionWindow); WRAP(ResizeWindow); WRAP(RestackWindow); WRAP(ReparentWindow); diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index aa7fa930c..891807320 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -304,20 +304,20 @@ RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask) } /* - * RootlessPositionWindow - * This is a hook for when DIX moves or resizes a window. - * Update the frame position now although the physical window is moved - * in RootlessMoveWindow. (x, y) are *inside* position. After this, - * mi and fb are expecting the pixmap to be at the new location. + * @brief DIX move/resize hook + * + * This is a hook for when DIX moves or resizes a window. + * Update the frame position now although the physical window is moved + * in RootlessMoveWindow. (x, y) are *inside* position. After this, + * mi and fb are expecting the pixmap to be at the new location. */ -Bool -RootlessPositionWindow(WindowPtr pWin, int x, int y) +void RootlessWindowPosition(CallbackListPtr *pcbl, ScreenPtr pScreen, XorgScreenWindowPositionParamRec *param) { - ScreenPtr pScreen = pWin->drawable.pScreen; + WindowPtr pWin = param->window; RootlessWindowRec *winRec = WINREC(pWin); - Bool result; - RL_DEBUG_MSG("positionwindow start (win %p (%lu) @ %i, %i)\n", pWin, RootlessWID(pWin), x, y); + RL_DEBUG_MSG("positionwindow start (win %p (%lu) @ %i, %i)\n", pWin, + RootlessWID(pWin), param->x, param->y); if (winRec) { if (winRec->is_drawing) { @@ -325,16 +325,11 @@ RootlessPositionWindow(WindowPtr pWin, int x, int y) int bw = wBorderWidth(pWin); winRec->pixmap->devPrivate.ptr = winRec->pixelData; - SetPixmapBaseToScreen(winRec->pixmap, x - bw, y - bw); + SetPixmapBaseToScreen(winRec->pixmap, param->x - bw, param->y - bw); } } - SCREEN_UNWRAP(pScreen, PositionWindow); - result = pScreen->PositionWindow(pWin, x, y); - SCREEN_WRAP(pScreen, PositionWindow); - RL_DEBUG_MSG("positionwindow end\n"); - return result; } /* diff --git a/miext/rootless/rootlessWindow.h b/miext/rootless/rootlessWindow.h index dc7de79db..8a030939b 100644 --- a/miext/rootless/rootlessWindow.h +++ b/miext/rootless/rootlessWindow.h @@ -42,7 +42,7 @@ void RootlessWindowDestroy(CallbackListPtr *pcbl, ScreenPtr pScreen, WindowPtr p void RootlessSetShape(WindowPtr pWin, int kind); Bool RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask); -Bool RootlessPositionWindow(WindowPtr pWin, int x, int y); +void RootlessWindowPosition(CallbackListPtr *pcbl, ScreenPtr pScreen, XorgScreenWindowPositionParamRec *param); Bool RootlessRealizeWindow(WindowPtr pWin); Bool RootlessUnrealizeWindow(WindowPtr pWin); void RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib);