r=mkaply, a=brendan
OS/2 bring up - Menus sometimes not drawing correctly
This commit is contained in:
mkaply%us.ibm.com 2000-06-23 14:38:08 +00:00
Родитель ace15471db
Коммит 885ba8fe38
2 изменённых файлов: 14 добавлений и 9 удалений

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

@ -216,7 +216,7 @@ MRESULT EXPENTRY fnwpFrame( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
// if we are supposed to be consuming events and it is
// a Mouse Button down, let it go through
if (gRollupConsumeRollupEvent && msg != WM_BUTTON1DOWN) {
return FALSE;
// return FALSE;
}
}
}

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

@ -35,6 +35,7 @@
* 06/14/2000 IBM Corp. Removed dead menu code to fix build break.
* 06/15/2000 IBM Corp. Created NS2PM for rectangles.
* 06/21/2000 IBM Corp. Corrected menu parentage; added CaptureMouse.
* 06/22/2000 IBM Corp. Corrected menu ownership
*
*/
@ -200,13 +201,6 @@ void nsWindow::DoCreate( HWND hwndP, nsWindow *aParent, const nsRect &aRect,
{
mWindowState = nsWindowState_eInCreate;
if( hwndP != HWND_DESKTOP && aInitData &&
( aInitData->mWindowType == eWindowType_dialog ||
aInitData->mWindowType == eWindowType_popup ||
aInitData->mWindowType == eWindowType_toplevel) ) {
hwndP = HWND_DESKTOP;
}
// Must ensure toolkit before attempting to thread-switch!
if( !mToolkit)
{
@ -289,6 +283,17 @@ void nsWindow::RealDoCreate( HWND hwndP,
style &= ~WS_CLIPSIBLINGS;
}
// For pop-up menus, the parent is the desktop, but use the "parent" as owner
if( hwndP != HWND_DESKTOP && aInitData &&
aInitData->mWindowType == eWindowType_popup)
{
if( !hwndOwner)
{
hwndOwner = hwndP;
}
hwndP = HWND_DESKTOP;
}
// Create a window: create hidden & then size to avoid swp_noadjust problems
// owner == parent except for 'borderless top-level' -- see nsCanvas.cpp
mWnd = WinCreateWindow( hwndP,
@ -507,7 +512,7 @@ MRESULT EXPENTRY fnwpNSWindow( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
// if we are supposed to be consuming events and it is
// a Mouse Button down, let it go through
if (gRollupConsumeRollupEvent && msg != WM_BUTTON1DOWN) {
return FALSE;
// return FALSE;
}
}
}