# 24238
r kmcclusk@netscape.com d Added ScrollWidgets methods to nsWindow. This is same bug as 22067 for windows. git-svn-id: svn://10.0.0.236/trunk@58126 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
55356cc71b
commit
da40aa3350
@ -1734,6 +1734,35 @@ NS_IMETHODIMP nsWindow::Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect)
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Scroll the bits of a window
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
NS_IMETHODIMP nsWindow::ScrollWidgets(PRInt32 aDx, PRInt32 aDy)
|
||||
{
|
||||
UnqueueDraw();
|
||||
mUpdateArea->Offset(aDx, aDy);
|
||||
// printf("mScrollExposeCounter++ = %i\n", mScrollExposeCounter);
|
||||
mScrollExposeCounter++;
|
||||
|
||||
if (mSuperWin) {
|
||||
// save the old backing color
|
||||
nscolor currentColor = GetBackgroundColor();
|
||||
// this isn't too painful to do right before a scroll.
|
||||
// as owen says "it's just 12 bytes sent to the server."
|
||||
// and it makes scrolling look a lot better while still
|
||||
// preserving the gray color when you drag another window
|
||||
// on top or when just creating a window
|
||||
gdk_window_set_back_pixmap(mSuperWin->bin_window, NULL, 0);
|
||||
// scroll baby, scroll!
|
||||
gdk_superwin_scroll(mSuperWin, aDx, aDy);
|
||||
// reset the color
|
||||
SetBackgroundColor(currentColor);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsWindow::ScrollRect(nsRect &aSrcRect, PRInt32 aDx, PRInt32 aDy)
|
||||
{
|
||||
|
||||
@ -62,6 +62,7 @@ public:
|
||||
virtual void* GetNativeData(PRUint32 aDataType);
|
||||
|
||||
NS_IMETHOD Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect);
|
||||
NS_IMETHOD ScrollWidgets(PRInt32 aDx, PRInt32 aDy);
|
||||
NS_IMETHOD ScrollRect(nsRect &aSrcRect, PRInt32 aDx, PRInt32 aDy);
|
||||
|
||||
NS_IMETHOD SetTitle(const nsString& aTitle);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user