mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 86606 - <SELECT>s disappear when using X-Mouse
r=timeless, sr=hewitt
This commit is contained in:
parent
432f3e947f
commit
10982a3fe2
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user