diff --git a/gfx/src/gtk/nsDrawingSurfaceGTK.cpp b/gfx/src/gtk/nsDrawingSurfaceGTK.cpp index b90f756a30f..6a7082e8f88 100644 --- a/gfx/src/gtk/nsDrawingSurfaceGTK.cpp +++ b/gfx/src/gtk/nsDrawingSurfaceGTK.cpp @@ -112,6 +112,8 @@ NS_IMETHODIMP nsDrawingSurfaceGTK :: Lock(PRInt32 aX, PRInt32 aY, } mLocked = PR_TRUE; + mLockX = aX; + mLockY = aY; mLockWidth = aWidth; mLockHeight = aHeight; mLockFlags = aFlags; @@ -138,10 +140,21 @@ NS_IMETHODIMP nsDrawingSurfaceGTK :: Unlock(void) NS_ASSERTION(0, "attempting to unlock an DS that isn't locked"); return NS_ERROR_FAILURE; } +/* + //if it is writeable, we are going to want to redraw the pixmap from the image. + gdk_draw_image(GdkDrawable *drawable, + mGC, + mImage, + 0, 0, + mLockX, mLockY, + mLockWidth, mLockHeight); +*/ ::gdk_image_destroy(mImage); mImage = nsnull; + mLocked = PR_FALSE; + return NS_OK; } diff --git a/gfx/src/gtk/nsDrawingSurfaceGTK.h b/gfx/src/gtk/nsDrawingSurfaceGTK.h index 6af2fbcd4f8..8a8d5bf3144 100644 --- a/gfx/src/gtk/nsDrawingSurfaceGTK.h +++ b/gfx/src/gtk/nsDrawingSurfaceGTK.h @@ -66,6 +66,8 @@ private: /* for locks */ GdkImage *mImage; + PRint32 mLockX; + PRint32 mLockY; PRUint32 mLockWidth; PRUint32 mLockHeight; PRUint32 mLockFlags;