xserver: Branch 'server-1.4-branch' - 2 commits
Daniel Stone
daniels at kemper.freedesktop.org
Tue Feb 19 11:57:22 PST 2008
composite/compwindow.c | 25 +++++++++++++++++++++++++
hw/xfree86/modes/xf86Rotate.c | 4 ++--
2 files changed, 27 insertions(+), 2 deletions(-)
New commits:
commit dc30ade6496c7cc24e38c419e229159525fe042f
Author: Maarten Maathuis <madman2003 at gmail.com>
Date: Sun Feb 17 18:47:28 2008 +0100
Fix rotation for multi-monitor situation.
- The (x,y)-coordinates of the crtc were not being passed as xFixed values, which made it an obscure bug to find.
- Fix bug #13787.
(cherry picked from commit a48cc88ea2674c28b69b8d738b168cbafcf4001f)
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 380478f..dd0e659 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -579,9 +579,9 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
}
else
{
- PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, crtc->x, crtc->y);
+ PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, F(crtc->x), F(crtc->y));
PictureTransformIsInverse ("offset", &crtc_to_fb, &fb_to_crtc);
-
+
/*
* these are the size of the shadow pixmap, which
* matches the mode, not the pre-rotated copy in the
commit 3db5930c61aeb849de3b21e7ba0d86d3c0cf72bb
Author: Maarten Maathuis <madman2003 at gmail.com>
Date: Sun Feb 17 11:21:01 2008 +0100
Resize composite overlay window when the root window changes.
- This allows some compositing managers to work, even after randr12 has changed the root window size.
- Thanks to ajax for figuring out the best place to put this.
- Example:
- xf86RandR12SetMode() calls EnableDisableFBAccess().
- That calls xf86SetRootClip() which in turn calls ResizeChildrenWinSize().
- The final step is the call to PositionWindow().
(cherry picked from commit 70c0592a97c7dc9db0576d32b3bdbe4766520509)
diff --git a/composite/compwindow.c b/composite/compwindow.c
index bfd2946..33192ad 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -165,6 +165,29 @@ compCheckRedirect (WindowPtr pWin)
return TRUE;
}
+static int
+updateOverlayWindow(ScreenPtr pScreen)
+{
+ CompScreenPtr cs;
+ WindowPtr pWin; /* overlay window */
+ XID vlist[2];
+
+ cs = GetCompScreen(pScreen);
+ if ((pWin = cs->pOverlayWin) != NULL) {
+ if ((pWin->drawable.width == pScreen->width) &&
+ (pWin->drawable.height == pScreen->height))
+ return Success;
+
+ /* Let's resize the overlay window. */
+ vlist[0] = pScreen->width;
+ vlist[1] = pScreen->height;
+ return ConfigureWindow(pWin, CWWidth | CWHeight, vlist, wClient(pWin));
+ }
+
+ /* Let's be on the safe side and not assume an overlay window is always allocated. */
+ return Success;
+}
+
Bool
compPositionWindow (WindowPtr pWin, int x, int y)
{
@@ -203,6 +226,8 @@ compPositionWindow (WindowPtr pWin, int x, int y)
cs->PositionWindow = pScreen->PositionWindow;
pScreen->PositionWindow = compPositionWindow;
compCheckTree (pWin->drawable.pScreen);
+ if (updateOverlayWindow(pScreen) != Success)
+ ret = FALSE;
return ret;
}
More information about the xorg-commit
mailing list