Bug 86606 - <SELECT>s disappear when using X-Mouse

r=timeless, sr=hewitt
This commit is contained in:
dean_tessman%hotmail.com 2001-12-11 06:16:07 +00:00
Родитель 432f3e947f
Коммит 10982a3fe2
5 изменённых файлов: 28 добавлений и 8 удалений

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

@ -20,6 +20,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dean Tessman <dean_tessman@hotmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@ -204,10 +205,13 @@ public:
// the popup area
NS_IMETHOD ShouldRollupOnMouseWheelEvent(PRBool *aShouldRollup)
{ *aShouldRollup = PR_TRUE; return NS_OK;}
//NS_IMETHOD ShouldRollupOnMouseWheelEvent(nsIWidget *aWidget, PRBool *aShouldRollup)
//{ *aShouldRollup = PR_FALSE; return NS_OK;}
// a combobox should not roll up if activated by a mouse activate message (eg. X-mouse)
NS_IMETHOD ShouldRollupOnMouseActivate(PRBool *aShouldRollup)
{ *aShouldRollup = PR_FALSE; return NS_OK;}
NS_IMETHOD SetFrameConstructor(nsCSSFrameConstructor *aConstructor)
{ mFrameConstructor = aConstructor; return NS_OK;} // not owner - do not addref!

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

@ -20,6 +20,7 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dean Tessman <dean_tessman@hotmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@ -204,10 +205,13 @@ public:
// the popup area
NS_IMETHOD ShouldRollupOnMouseWheelEvent(PRBool *aShouldRollup)
{ *aShouldRollup = PR_TRUE; return NS_OK;}
//NS_IMETHOD ShouldRollupOnMouseWheelEvent(nsIWidget *aWidget, PRBool *aShouldRollup)
//{ *aShouldRollup = PR_FALSE; return NS_OK;}
// a combobox should not roll up if activated by a mouse activate message (eg. X-mouse)
NS_IMETHOD ShouldRollupOnMouseActivate(PRBool *aShouldRollup)
{ *aShouldRollup = PR_FALSE; return NS_OK;}
NS_IMETHOD SetFrameConstructor(nsCSSFrameConstructor *aConstructor)
{ mFrameConstructor = aConstructor; return NS_OK;} // not owner - do not addref!

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

@ -19,9 +19,11 @@
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Original Author: David W. Hyatt (hyatt@netscape.com)
*
* Contributor(s):
* Dean Tessman <dean_tessman@hotmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
@ -120,6 +122,12 @@ NS_IMETHODIMP nsMenuDismissalListener::ShouldRollupOnMouseWheelEvent(PRBool *aSh
// uggggh.
// a menu should not roll up if activated by a mouse activate message (eg. X-mouse)
NS_IMETHODIMP nsMenuDismissalListener::ShouldRollupOnMouseActivate(PRBool *aShouldRollup)
{
*aShouldRollup = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP
nsMenuDismissalListener::GetSubmenuWidgetChain(nsISupportsArray **_retval)

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

@ -20,6 +20,7 @@
* Contributor(s):
* Rod Spears <rods@netscape.com>
* Stuart Parmenter <pavlov@netscape.com>
* Dean Tessman <dean_tessman@hotmail.com>
*/
#include "nsISupports.idl"
@ -36,9 +37,15 @@ interface nsIRollupListener : nsISupports
void Rollup();
/**
* Asks the RoolupListener if it should rollup on mousevents
* Asks the RollupListener if it should rollup on mousevents
* @result NS_Ok if no errors
*/
void ShouldRollupOnMouseWheelEvent(out PRBool aShould);
/**
* Asks the RollupListener if it should rollup on mouse activate, eg. X-Mouse
* @result NS_Ok if no errors
*/
void ShouldRollupOnMouseActivate(out PRBool aShould);
};

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

@ -1034,10 +1034,7 @@ nsWindow :: DealWithPopups ( UINT inMsg, WPARAM inWParam, LPARAM inLParam, LRESU
{
// WM_MOUSEACTIVATE cause by moving the mouse - X-mouse (eg. TweakUI)
// must be enabled in Windows.
// Assume that if the popup doesn't roll up on mouse wheel events,
// then it shouldn't roll up on this event either. This allows the
// menu to stay open when it's activated by X-Mouse.
gRollupListener->ShouldRollupOnMouseWheelEvent(&rollup);
gRollupListener->ShouldRollupOnMouseActivate(&rollup);
if (!rollup)
{
*outResult = MA_NOACTIVATE;