зеркало из https://github.com/mozilla/gecko-dev.git
Bug 618248, don't close popups when a window is lowered while dragging, prevents bookmark menu from closing, r=karl,a=blocking
This commit is contained in:
Родитель
574cbda199
Коммит
d40e3ea557
|
@ -2891,7 +2891,24 @@ nsWindow::OnContainerFocusOutEvent(GtkWidget *aWidget, GdkEventFocus *aEvent)
|
|||
LOGFOCUS(("OnContainerFocusOutEvent [%p]\n", (void *)this));
|
||||
|
||||
if (mWindowType == eWindowType_toplevel || mWindowType == eWindowType_dialog) {
|
||||
check_for_rollup(aEvent->window, 0, 0, PR_FALSE, PR_TRUE);
|
||||
nsCOMPtr<nsIDragService> dragService = do_GetService(kCDragServiceCID);
|
||||
nsCOMPtr<nsIDragSession> dragSession;
|
||||
dragService->GetCurrentSession(getter_AddRefs(dragSession));
|
||||
|
||||
// Rollup popups when a window is focused out unless a drag is occurring.
|
||||
// This check is because drags grab the keyboard and cause a focus out on
|
||||
// versions of GTK before 2.18.
|
||||
PRBool shouldRollup = !dragSession;
|
||||
if (!shouldRollup) {
|
||||
// we also roll up when a drag is from a different application
|
||||
nsCOMPtr<nsIDOMNode> sourceNode;
|
||||
dragSession->GetSourceNode(getter_AddRefs(sourceNode));
|
||||
shouldRollup = (sourceNode == nsnull);
|
||||
}
|
||||
|
||||
if (shouldRollup) {
|
||||
check_for_rollup(aEvent->window, 0, 0, PR_FALSE, PR_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_X11
|
||||
|
|
Загрузка…
Ссылка в новой задаче