зеркало из https://github.com/mozilla/pjs.git
add 'activate' parameter to nsIWidget::PlaceBehind. bug 22658 r=rods,kmcclusk
This commit is contained in:
Родитель
d4c47d129b
Коммит
2160d7e608
|
@ -391,7 +391,7 @@ class nsIWidget : public nsISupports {
|
|||
* control z-order for child widgets of other widgets.)
|
||||
* null aWidget means put on top.
|
||||
*/
|
||||
NS_IMETHOD PlaceBehind(nsIWidget *aWidget) = 0;
|
||||
NS_IMETHOD PlaceBehind(nsIWidget *aWidget, PRBool aActivate) = 0;
|
||||
|
||||
/**
|
||||
* Minimize, maximize or normalize the window size.
|
||||
|
|
|
@ -693,7 +693,7 @@ NS_IMETHODIMP nsMacWindow::Move(PRInt32 aX, PRInt32 aY)
|
|||
// Position the window behind the given window
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_METHOD nsMacWindow::PlaceBehind(nsIWidget *aWidget)
|
||||
NS_METHOD nsMacWindow::PlaceBehind(nsIWidget *aWidget, PRBool aActivate)
|
||||
{
|
||||
if (aWidget) {
|
||||
WindowPtr behind = (WindowPtr)aWidget->GetNativeData(NS_NATIVE_DISPLAY);
|
||||
|
|
|
@ -78,10 +78,10 @@ public:
|
|||
nsNativeWidget aNativeParent = nsnull);
|
||||
|
||||
NS_IMETHOD Show(PRBool aState);
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD PlaceBehind(nsIWidget *aWidget);
|
||||
NS_IMETHOD Resize(PRInt32 aWidth,PRInt32 aHeight, PRBool aRepaint);
|
||||
NS_IMETHOD ConstrainPosition(PRInt32 *aX, PRInt32 *aY);
|
||||
NS_IMETHOD Move(PRInt32 aX, PRInt32 aY);
|
||||
NS_IMETHOD PlaceBehind(nsIWidget *aWidget, PRBool aActivate);
|
||||
NS_IMETHOD Resize(PRInt32 aWidth,PRInt32 aHeight, PRBool aRepaint);
|
||||
NS_IMETHOD GetScreenBounds(nsRect &aRect);
|
||||
virtual PRBool OnPaint(nsPaintEvent &event);
|
||||
|
||||
|
|
|
@ -1223,12 +1223,14 @@ NS_METHOD nsWindow::IsVisible(PRBool & bState)
|
|||
// Position the window behind the given window
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_METHOD nsWindow::PlaceBehind(nsIWidget *aWidget)
|
||||
NS_METHOD nsWindow::PlaceBehind(nsIWidget *aWidget, PRBool aActivate)
|
||||
{
|
||||
HWND behind;
|
||||
behind = aWidget ? (HWND)aWidget->GetNativeData(NS_NATIVE_WINDOW) : HWND_TOP;
|
||||
::SetWindowPos(mWnd, behind, 0, 0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOREPOSITION | SWP_NOSIZE);
|
||||
HWND behind = aWidget ? (HWND)aWidget->GetNativeData(NS_NATIVE_WINDOW) : HWND_TOP;
|
||||
UINT flags = SWP_NOMOVE | SWP_NOREPOSITION | SWP_NOSIZE;
|
||||
if (!aActivate)
|
||||
flags |= SWP_NOACTIVATE;
|
||||
|
||||
::SetWindowPos(mWnd, behind, 0, 0, 0, 0, flags);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -2339,15 +2341,6 @@ BOOL nsWindow::OnChar( UINT mbcsCharCode, UINT virtualKeyCode, bool isMultiByte
|
|||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Process all nsWindows messages
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
static PRBool gJustGotDeactivate = PR_FALSE;
|
||||
static PRBool gJustGotActivate = PR_FALSE;
|
||||
|
||||
void nsWindow::ConstrainZLevel(HWND *aAfter) {
|
||||
|
||||
nsZLevelEvent event;
|
||||
|
@ -2384,6 +2377,14 @@ void nsWindow::ConstrainZLevel(HWND *aAfter) {
|
|||
NS_RELEASE(event.widget);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Process all nsWindows messages
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
static PRBool gJustGotDeactivate = PR_FALSE;
|
||||
static PRBool gJustGotActivate = PR_FALSE;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
virtual nsIWidget* GetParent(void);
|
||||
NS_IMETHOD Show(PRBool bState);
|
||||
NS_IMETHOD IsVisible(PRBool & aState);
|
||||
NS_IMETHOD PlaceBehind(nsIWidget *aWidget);
|
||||
NS_IMETHOD PlaceBehind(nsIWidget *aWidget, PRBool aActivate);
|
||||
|
||||
NS_IMETHOD ModalEventFilter(PRBool aRealEvent, void *aEvent,
|
||||
PRBool *aForWindow);
|
||||
|
|
|
@ -338,7 +338,7 @@ NS_IMETHODIMP nsBaseWidget::GetZIndex(PRInt32* aZIndex)
|
|||
// Places widget behind the given widget (platforms must override)
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsBaseWidget::PlaceBehind(nsIWidget *aWidget)
|
||||
NS_IMETHODIMP nsBaseWidget::PlaceBehind(nsIWidget *aWidget, PRBool aActivate)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
|
||||
NS_IMETHOD SetZIndex(PRInt32 aZIndex);
|
||||
NS_IMETHOD GetZIndex(PRInt32* aZIndex);
|
||||
NS_IMETHOD PlaceBehind(nsIWidget *aWidget);
|
||||
NS_IMETHOD PlaceBehind(nsIWidget *aWidget, PRBool aActivate);
|
||||
|
||||
NS_IMETHOD SetSizeMode(PRInt32 aMode);
|
||||
NS_IMETHOD GetSizeMode(PRInt32* aMode);
|
||||
|
|
Загрузка…
Ссылка в новой задаче