From 5596e5e7747b2c05fff12129ea788a75e6142bb3 Mon Sep 17 00:00:00 2001 From: "pierre%netscape.com" Date: Fri, 10 Feb 2006 22:48:29 +0000 Subject: [PATCH] Fix a crash with Test10: a missing SetPort() in FindScreenForSurface(). --- widget/src/mac/nsDeviceContextMac.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/widget/src/mac/nsDeviceContextMac.cpp b/widget/src/mac/nsDeviceContextMac.cpp index 1f7f546b059d..e8cc06a0d6d9 100644 --- a/widget/src/mac/nsDeviceContextMac.cpp +++ b/widget/src/mac/nsDeviceContextMac.cpp @@ -476,6 +476,8 @@ nsDeviceContextMac :: FindScreenForSurface ( nsIScreen** outScreen ) NS_IF_ADDREF(*outScreen = sPrimaryScreen.get()); } else { + ::SetPort ( window ); + // convert window bounds to global coordinates Point topLeft = { bounds.top, bounds.left }; Point bottomRight = { bounds.bottom, bounds.right };