зеркало из https://github.com/mozilla/pjs.git
[OS/2] Bug 506997: fix build break after removal of deferred window position and clean up
This commit is contained in:
Родитель
c8d0b23aa5
Коммит
953bc74eee
|
@ -145,11 +145,6 @@ static HPOINTER gPtrArray[IDC_COUNT];
|
|||
static PRBool gIsTrackPoint = PR_FALSE;
|
||||
static PRBool gIsDBCS = PR_FALSE;
|
||||
|
||||
// The last user input event time in milliseconds. If there are any pending
|
||||
// native toolkit input events it returns the current time. The value is
|
||||
// compatible with PR_IntervalToMicroseconds(PR_IntervalNow()).
|
||||
static PRUint32 gLastInputEventTime = 0;
|
||||
|
||||
#ifdef DEBUG_FOCUS
|
||||
int currentWindowIdentifier = 0;
|
||||
#endif
|
||||
|
@ -205,9 +200,6 @@ nsWindow::nsWindow() : nsBaseWidget()
|
|||
mPrevWndProc = NULL;
|
||||
mParent = 0;
|
||||
mNextID = 1;
|
||||
mSWPs = 0;
|
||||
mlHave = 0;
|
||||
mlUsed = 0;
|
||||
mFrameIcon = 0;
|
||||
mDeadKey = 0;
|
||||
mHaveDeadKey = FALSE;
|
||||
|
@ -1334,7 +1326,7 @@ NS_METHOD nsWindow::Resize(PRInt32 aX,
|
|||
{
|
||||
// For mWnd & eWindowType_child set the cached values upfront, see bug 286555.
|
||||
// For other mWnd types we defer transfer of values to mBounds to
|
||||
// SetWindowPos(), see bug 391421.
|
||||
// WinSetWindowPos(), see bug 391421.
|
||||
if( !mWnd || mWindowType == eWindowType_child)
|
||||
{
|
||||
// Set cached value for lightweight and printing
|
||||
|
@ -1362,9 +1354,9 @@ NS_METHOD nsWindow::Resize(PRInt32 aX,
|
|||
ptl.y = WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN) - h - 1 - aY;
|
||||
}
|
||||
|
||||
if( !SetWindowPos( 0, ptl.x, ptl.y, w, h, SWP_MOVE | SWP_SIZE))
|
||||
if( aRepaint)
|
||||
Invalidate(PR_FALSE);
|
||||
WinSetWindowPos(GetMainWindow(), 0, ptl.x, ptl.y, w, h, SWP_MOVE | SWP_SIZE);
|
||||
if (aRepaint)
|
||||
Invalidate(PR_FALSE);
|
||||
|
||||
#if DEBUG_sobotka
|
||||
printf("+++++++++++Resized 0x%lx at %ld, %ld to %d x %d (%d,%d)\n",
|
||||
|
@ -2788,11 +2780,6 @@ void nsWindow::OnDestroy()
|
|||
SubclassWindow( PR_FALSE);
|
||||
mWnd = 0;
|
||||
|
||||
// if we were in the middle of deferred window positioning then free up
|
||||
if( mSWPs) free( mSWPs);
|
||||
mSWPs = 0;
|
||||
mlHave = mlUsed = 0;
|
||||
|
||||
// release references to context, toolkit, appshell, children
|
||||
nsBaseWidget::OnDestroy();
|
||||
|
||||
|
@ -3346,23 +3333,6 @@ nsWindow::HasPendingInputEvent()
|
|||
// OS2-specific routines to emulate Windows behaviors
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
BOOL nsWindow::SetWindowPos( HWND ib, long x, long y, long cx, long cy, ULONG flags)
|
||||
{
|
||||
BOOL bDeferred = FALSE;
|
||||
|
||||
if( mParent && mParent->mSWPs) // XXX bit implicit...
|
||||
{
|
||||
mParent->DeferPosition( GetMainWindow(), ib, x, y, cx, cy, flags);
|
||||
bDeferred = TRUE;
|
||||
}
|
||||
else // WinSetWindowPos appears not to need msgq (hmm)
|
||||
WinSetWindowPos( GetMainWindow(), ib, x, y, cx, cy, GetSWPFlags(flags));
|
||||
|
||||
// When the window is actually sized, mBounds will be updated in the fnwp.
|
||||
|
||||
return bDeferred;
|
||||
}
|
||||
|
||||
nsresult nsWindow::GetWindowText( nsString &aStr, PRUint32 *rc)
|
||||
{
|
||||
// Switch to the PM thread if necessary...
|
||||
|
|
|
@ -205,16 +205,12 @@ protected:
|
|||
// hooks subclasses may wish to override!
|
||||
virtual void PostCreateWidget() {}
|
||||
virtual PRInt32 GetClientHeight() { return mBounds.height; }
|
||||
virtual ULONG GetSWPFlags( ULONG flags) { return flags; }
|
||||
virtual void SetupForPrint( HWND /*hwnd*/) {}
|
||||
|
||||
// Useful functions for subclasses to use, threaded as necessary.
|
||||
virtual nsresult GetWindowText( nsString &str, PRUint32 *rc);
|
||||
virtual void AddToStyle( ULONG style);
|
||||
virtual void RemoveFromStyle( ULONG style);
|
||||
// return true if deferred
|
||||
virtual BOOL SetWindowPos( HWND hwndInsertBehind, long x, long y,
|
||||
long cx, long cy, unsigned long flags);
|
||||
|
||||
// Message handlers - may wish to override. Default implementation for
|
||||
// control, paint & scroll is to do nothing.
|
||||
|
@ -244,8 +240,6 @@ protected:
|
|||
PFNWP mPrevWndProc; // previous window procedure
|
||||
nsWindow *mParent; // parent widget
|
||||
ULONG mNextID; // next child window id
|
||||
PSWP mSWPs; // SWPs for deferred window positioning
|
||||
ULONG mlHave, mlUsed; // description of mSWPs array
|
||||
HPOINTER mFrameIcon; // current frame icon
|
||||
VDKEY mDeadKey; // dead key from previous keyevent
|
||||
BOOL mHaveDeadKey; // is mDeadKey valid [0 may be a valid dead key, for all I know]
|
||||
|
@ -302,7 +296,6 @@ protected:
|
|||
PRInt16 aButton = nsMouseEvent::eLeftButton);
|
||||
virtual PRBool DispatchResizeEvent( PRInt32 aClientX, PRInt32 aClientY);
|
||||
void GetNonClientBounds(nsIntRect &aRect);
|
||||
void DeferPosition( HWND, HWND, long, long, long, long, ULONG);
|
||||
void ConstrainZLevel(HWND *aAfter);
|
||||
|
||||
PRBool CheckDragStatus(PRUint32 aAction, HPS * oHps);
|
||||
|
|
Загрузка…
Ссылка в новой задаче