diff --git a/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp b/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp index 7425f732705..8a26e82468a 100644 --- a/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp +++ b/mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp @@ -258,7 +258,9 @@ NS_IMETHODIMP nsDeviceContextXlib::GetDrawingSurface(nsIRenderingContext &aConte NS_IMETHODIMP nsDeviceContextXlib::ConvertPixel(nscolor aColor, PRUint32 & aPixel) { PR_LOG(DeviceContextXlibLM, PR_LOG_DEBUG, ("nsDeviceContextXlib::ConvertPixel()\n")); - aPixel = xlib_rgb_xpixel_from_rgb(aPixel); + aPixel = xlib_rgb_xpixel_from_rgb(NS_RGB(NS_GET_B(aPixel), + NS_GET_G(aPixel), + NS_GET_R(aPixel))); return NS_OK; } diff --git a/mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp b/mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp index d32de927cac..7c3bb2661cf 100644 --- a/mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp +++ b/mozilla/gfx/src/xlib/nsRenderingContextXlib.cpp @@ -513,12 +513,9 @@ nsRenderingContextXlib::SetColor(nscolor aColor) return NS_ERROR_FAILURE; mCurrentColor = aColor; - xlib_rgb_gc_set_foreground(mRenderingSurface->GetGC(), NS_RGB(NS_GET_R(aColor), + xlib_rgb_gc_set_foreground(mRenderingSurface->GetGC(), NS_RGB(NS_GET_B(aColor), NS_GET_G(aColor), - NS_GET_B(aColor))); - xlib_rgb_gc_set_background(mRenderingSurface->GetGC(), NS_RGB(NS_GET_R(aColor), - NS_GET_G(aColor), - NS_GET_B(aColor))); + NS_GET_R(aColor))); PR_LOG(RenderingContextXlibLM, PR_LOG_DEBUG, ("Setting color to %d %d %d\n", NS_GET_R(aColor), NS_GET_G(aColor), NS_GET_B(aColor))); return NS_OK; }