mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
# 24238
r kmcclusk@netscape.com d Added ScrollWidgets methods to nsWindow. This is same bug as 22067 for windows.
This commit is contained in:
parent
5014545a00
commit
d5e965f8b2
@ -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…
Reference in New Issue
Block a user