зеркало из https://github.com/mozilla/gecko-dev.git
Fix bug 281732: event handling in camino's native popup got broken when screen-relative coordinates in Cocoa widget were fixed (bug 281470), which caused the nsComboboxControlFrame/nsListControlFrame code to start doing mouse capture, and showing the XUL popup. This revealed a bug in nsCocoaWindow, which failed to set the window type in some situations. This change only affects Camino.
This commit is contained in:
Родитель
0874f92566
Коммит
1bc071b87a
|
@ -364,11 +364,13 @@ nsresult nsCocoaWindow::StandardCreate(nsIWidget *aParent,
|
||||||
Inherited::BaseCreate ( aParent, aRect, aHandleEventFunction, aContext, aAppShell,
|
Inherited::BaseCreate ( aParent, aRect, aHandleEventFunction, aContext, aAppShell,
|
||||||
aToolkit, aInitData );
|
aToolkit, aInitData );
|
||||||
|
|
||||||
if ( !aNativeParent ) {
|
if (!aNativeParent || (aInitData && aInitData->mWindowType == eWindowType_popup))
|
||||||
|
{
|
||||||
mOffsetParent = aParent;
|
mOffsetParent = aParent;
|
||||||
|
|
||||||
nsWindowType windowType = eWindowType_toplevel;
|
nsWindowType windowType = eWindowType_toplevel;
|
||||||
if (aInitData) {
|
if (aInitData)
|
||||||
|
{
|
||||||
mWindowType = aInitData->mWindowType;
|
mWindowType = aInitData->mWindowType;
|
||||||
// if a toplevel window was requested without a titlebar, use a dialog windowproc
|
// if a toplevel window was requested without a titlebar, use a dialog windowproc
|
||||||
if (aInitData->mWindowType == eWindowType_toplevel &&
|
if (aInitData->mWindowType == eWindowType_toplevel &&
|
||||||
|
@ -377,7 +379,9 @@ nsresult nsCocoaWindow::StandardCreate(nsIWidget *aParent,
|
||||||
windowType = eWindowType_dialog;
|
windowType = eWindowType_dialog;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
mWindowType = (mIsDialog ? eWindowType_dialog : eWindowType_toplevel);
|
mWindowType = (mIsDialog ? eWindowType_dialog : eWindowType_toplevel);
|
||||||
|
}
|
||||||
|
|
||||||
// create the cocoa window
|
// create the cocoa window
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче