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:
smfr%smfr.org 2005-02-16 05:14:59 +00:00
Родитель 0874f92566
Коммит 1bc071b87a
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -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;