summaryrefslogtreecommitdiff
path: root/hw/xquartz
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-05-22 10:18:36 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-05-22 11:17:59 -0700
commit1fb501ad1521cfedaa5cf3052d45a924ef1866cf (patch)
tree2768899e144b6f28fcddb0ca4251507109ce7ea4 /hw/xquartz
parent60af79e35ee8546a99d15a1358aac3deabfa22be (diff)
XQuartz: Don't crash if CG increases our display resolution
miPaintWindow would cause fbFill() to overwrite pScreen's pixmap which was sized for the old resolution. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'hw/xquartz')
-rw-r--r--hw/xquartz/quartz.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
index 68a059c47..c395b42e6 100644
--- a/hw/xquartz/quartz.c
+++ b/hw/xquartz/quartz.c
@@ -239,8 +239,6 @@ void QuartzUpdateScreens(void) {
AppleWMSetScreenOrigin(pRoot);
pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL);
- miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
-
/* <rdar://problem/7770779> pointer events are clipped to old display region after display reconfiguration
* http://xquartz.macosforge.org/trac/ticket/346
*/
@@ -268,6 +266,9 @@ void QuartzUpdateScreens(void) {
quartzProcs->UpdateScreen(pScreen);
+ /* miPaintWindow needs to be called after RootlessUpdateScreenPixmap (from xprUpdateScreen) */
+ miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);
+
/* Tell RandR about the new size, so new connections get the correct info */
RRScreenSizeNotify(pScreen);
}