зеркало из https://github.com/mozilla/pjs.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:
Родитель
994776bdf7
Коммит
0a5491b169
|
@ -364,11 +364,13 @@ nsresult nsCocoaWindow::StandardCreate(nsIWidget *aParent,
|
|||
Inherited::BaseCreate ( aParent, aRect, aHandleEventFunction, aContext, aAppShell,
|
||||
aToolkit, aInitData );
|
||||
|
||||
if ( !aNativeParent ) {
|
||||
if (!aNativeParent || (aInitData && aInitData->mWindowType == eWindowType_popup))
|
||||
{
|
||||
mOffsetParent = aParent;
|
||||
|
||||
nsWindowType windowType = eWindowType_toplevel;
|
||||
if (aInitData) {
|
||||
if (aInitData)
|
||||
{
|
||||
mWindowType = aInitData->mWindowType;
|
||||
// if a toplevel window was requested without a titlebar, use a dialog windowproc
|
||||
if (aInitData->mWindowType == eWindowType_toplevel &&
|
||||
|
@ -377,7 +379,9 @@ nsresult nsCocoaWindow::StandardCreate(nsIWidget *aParent,
|
|||
windowType = eWindowType_dialog;
|
||||
}
|
||||
else
|
||||
{
|
||||
mWindowType = (mIsDialog ? eWindowType_dialog : eWindowType_toplevel);
|
||||
}
|
||||
|
||||
// create the cocoa window
|
||||
NSRect rect;
|
||||
|
|
Загрузка…
Ссылка в новой задаче