diff options
author | marha <marha@users.sourceforge.net> | 2010-06-23 07:03:58 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-06-23 07:03:58 +0000 |
commit | 345335d61c71c245846d679d568a8b5eca1a5ca9 (patch) | |
tree | 7b878ae84134fa091dd2bdc2695251e609209ebe /xorg-server/composite/compwindow.c | |
parent | fbbbbe88405440920f4baa5a3107ec0b9a6f8cb7 (diff) | |
parent | c356d5298f18cd103ef7caad015d98d2022044ac (diff) | |
download | vcxsrv-345335d61c71c245846d679d568a8b5eca1a5ca9.tar.gz vcxsrv-345335d61c71c245846d679d568a8b5eca1a5ca9.tar.bz2 vcxsrv-345335d61c71c245846d679d568a8b5eca1a5ca9.zip |
svn merge "^/branches/released" .
Diffstat (limited to 'xorg-server/composite/compwindow.c')
-rw-r--r-- | xorg-server/composite/compwindow.c | 68 |
1 files changed, 59 insertions, 9 deletions
diff --git a/xorg-server/composite/compwindow.c b/xorg-server/composite/compwindow.c index 82f9b4cfd..0efae97eb 100644 --- a/xorg-server/composite/compwindow.c +++ b/xorg-server/composite/compwindow.c @@ -334,6 +334,65 @@ compImplicitRedirect (WindowPtr pWin, WindowPtr pParent) return FALSE;
}
+static void compFreeOldPixmap(WindowPtr pWin)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ if (pWin->redirectDraw != RedirectDrawNone)
+ {
+ CompWindowPtr cw = GetCompWindow (pWin);
+ if (cw->pOldPixmap)
+ {
+ (*pScreen->DestroyPixmap) (cw->pOldPixmap);
+ cw->pOldPixmap = NullPixmap;
+ }
+ }
+}
+void
+compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ CompScreenPtr cs = GetCompScreen (pScreen);
+
+ pScreen->MoveWindow = cs->MoveWindow;
+ (*pScreen->MoveWindow) (pWin, x, y, pSib, kind);
+ cs->MoveWindow = pScreen->MoveWindow;
+ pScreen->MoveWindow = compMoveWindow;
+
+ compFreeOldPixmap(pWin);
+ compCheckTree (pScreen);
+}
+
+void
+compResizeWindow (WindowPtr pWin, int x, int y,
+ unsigned int w, unsigned int h, WindowPtr pSib)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ CompScreenPtr cs = GetCompScreen (pScreen);
+
+ pScreen->ResizeWindow = cs->ResizeWindow;
+ (*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib);
+ cs->ResizeWindow = pScreen->ResizeWindow;
+ pScreen->ResizeWindow = compResizeWindow;
+
+ compFreeOldPixmap(pWin);
+ compCheckTree (pWin->drawable.pScreen);
+}
+
+void
+compChangeBorderWidth (WindowPtr pWin, unsigned int bw)
+{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+ CompScreenPtr cs = GetCompScreen (pScreen);
+
+ pScreen->ChangeBorderWidth = cs->ChangeBorderWidth;
+ (*pScreen->ChangeBorderWidth) (pWin, bw);
+ cs->ChangeBorderWidth = pScreen->ChangeBorderWidth;
+ pScreen->ChangeBorderWidth = compChangeBorderWidth;
+
+ compFreeOldPixmap(pWin);
+ compCheckTree (pWin->drawable.pScreen);
+}
+
void
compReparentWindow (WindowPtr pWin, WindowPtr pPriorParent)
{
@@ -705,7 +764,6 @@ compConfigNotify(WindowPtr pWin, int x, int y, int w, int h, CompScreenPtr cs = GetCompScreen (pScreen);
Bool ret = 0;
WindowPtr pParent = pWin->parent;
- CompWindowPtr cw;
int draw_x, draw_y;
Bool alloc_ret;
@@ -728,14 +786,6 @@ compConfigNotify(WindowPtr pWin, int x, int y, int w, int h, draw_x = pParent->drawable.x + x + bw;
draw_y = pParent->drawable.y + y + bw;
alloc_ret = compReallocPixmap (pWin, draw_x, draw_y, w, h, bw);
-
- cw = GetCompWindow (pWin);
- if (cw->pOldPixmap)
- {
- (*pScreen->DestroyPixmap) (cw->pOldPixmap);
- cw->pOldPixmap = NullPixmap;
- }
- compCheckTree (pScreen);
if (alloc_ret == FALSE)
return BadAlloc;
|