mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 632953 - Clear mouse capture after window resize completes. r=jimm
This commit is contained in:
parent
042412a300
commit
4127d3b0af
@ -59,4 +59,8 @@ CPPSRCS = \
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
LOCAL_INCLUDES = \
|
||||
-I$(srcdir)/../../content/events/src/ \
|
||||
$(NULL)
|
||||
|
||||
CXXFLAGS += $(MOZ_CAIRO_CFLAGS)
|
||||
|
@ -62,6 +62,7 @@
|
||||
#include "nsXULPopupManager.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsEventStateManager.h"
|
||||
|
||||
static NS_DEFINE_IID(kRegionCID, NS_REGION_CID);
|
||||
|
||||
@ -813,6 +814,20 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent,
|
||||
break;
|
||||
}
|
||||
|
||||
case NS_DONESIZEMOVE:
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> shell = do_QueryInterface(mObserver);
|
||||
if (shell) {
|
||||
nsPresContext* presContext = shell->GetPresContext();
|
||||
if (presContext) {
|
||||
nsEventStateManager::ClearGlobalActiveContent(nsnull);
|
||||
}
|
||||
|
||||
mObserver->ClearMouseCapture(aView);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case NS_XUL_CLOSE:
|
||||
{
|
||||
// if this is a popup, make a request to hide it. Note that a popuphidden
|
||||
|
@ -227,6 +227,9 @@ class nsHashKey;
|
||||
// keyboard accelerator indicators has changed.
|
||||
#define NS_UISTATECHANGED (NS_WINDOW_START + 43)
|
||||
|
||||
// Done sizing or moving a window, so ensure that the mousedown state was cleared.
|
||||
#define NS_DONESIZEMOVE (NS_WINDOW_START + 44)
|
||||
|
||||
#define NS_RESIZE_EVENT (NS_WINDOW_START + 60)
|
||||
#define NS_SCROLL_EVENT (NS_WINDOW_START + 61)
|
||||
|
||||
|
@ -5310,6 +5310,12 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
|
||||
DispatchPendingEvents();
|
||||
break;
|
||||
|
||||
case WM_EXITSIZEMOVE:
|
||||
if (!sIsInMouseCapture) {
|
||||
DispatchStandardEvent(NS_DONESIZEMOVE);
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_APPCOMMAND:
|
||||
{
|
||||
PRUint32 appCommand = GET_APPCOMMAND_LPARAM(lParam);
|
||||
|
Loading…
Reference in New Issue
Block a user