Bug 126066 - Changing caret (cursor) color.

r=tor@acm.org, sr=dbaron@dbaron.org
This commit is contained in:
pkw%us.ibm.com 2004-06-23 17:49:48 +00:00
Родитель 779b03c6b4
Коммит c769502ca2
2 изменённых файлов: 15 добавлений и 1 удалений

Просмотреть файл

@ -979,6 +979,10 @@ NS_IMETHODIMP nsRenderingContextGTK::InvertRect(nscoord aX, nscoord aY, nscoord
return NS_ERROR_FAILURE;
}
// Back up the current color, and use GXxor against white to get a
// visible result.
nscolor backupColor = mCurrentColor;
mCurrentColor = NS_RGB(255, 255, 255);
nscoord x,y,w,h;
x = aX;
@ -993,7 +997,7 @@ NS_IMETHODIMP nsRenderingContextGTK::InvertRect(nscoord aX, nscoord aY, nscoord
// It's all way off the screen anyway.
ConditionRect(x,y,w,h);
mFunction = GDK_INVERT;
mFunction = GDK_XOR;
UpdateGC();
@ -1005,6 +1009,9 @@ NS_IMETHODIMP nsRenderingContextGTK::InvertRect(nscoord aX, nscoord aY, nscoord
// Back to normal copy drawing mode
mFunction = GDK_COPY;
// Restore current color
mCurrentColor = backupColor;
return NS_OK;
}

Просмотреть файл

@ -965,6 +965,10 @@ nsRenderingContextXlib::InvertRect(nscoord aX, nscoord aY, nscoord aWidth, nscoo
NS_ENSURE_TRUE(mTranMatrix != nsnull, NS_ERROR_FAILURE);
NS_ENSURE_TRUE(mSurface != nsnull, NS_ERROR_FAILURE);
// Back up the current color, and use GXxor against white to get a
// visible result.
nscolor backupColor = mCurrentColor;
mCurrentColor = NS_RGB(255, 255, 255);
nscoord x,y,w,h;
x = aX;
@ -993,6 +997,9 @@ nsRenderingContextXlib::InvertRect(nscoord aX, nscoord aY, nscoord aWidth, nscoo
mFunction = GXcopy;
// Restore current color
mCurrentColor = backupColor;
return NS_OK;
}