Bug 934843 - Remove assertion that focus is never on popup windows. r=roc, a=lsblakk
authorKarl Tomlinson <karlt+@karlt.net>
Wed, 11 Dec 2013 09:51:42 +1300
changeset 167714 d453d9c5d9165cfdd86327450137ab2ac05dd1fb
parent 167713 79e2ad13871d646e5405e4f3dfe2bd1c6120f831
child 167715 8dfe78bce537aa02f1bff509e2002ad3a0c0541c
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, lsblakk
bugs934843
milestone27.0
Bug 934843 - Remove assertion that focus is never on popup windows. r=roc, a=lsblakk If an application has received focus from the window manager, but doesn't reassign focus to a child window before closing its focus window, focus can temporarily revert to PointerRoot before the window manager gives focus to another window. During PointerRoot focus, the window until the pointer has focus even if it is an override-redirect window.
widget/gtk/nsWindow.cpp
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -2808,19 +2808,16 @@ nsWindow::OnButtonReleaseEvent(GdkEventB
     nsEventStatus status;
     DispatchEvent(&event, status);
     mLastMotionPressure = pressure;
 }
 
 void
 nsWindow::OnContainerFocusInEvent(GdkEventFocus *aEvent)
 {
-    NS_ASSERTION(mWindowType != eWindowType_popup,
-                 "Unexpected focus on a popup window");
-
     LOGFOCUS(("OnContainerFocusInEvent [%p]\n", (void *)this));
 
     // Unset the urgency hint, if possible
     GtkWidget* top_window = GetToplevelWidget();
     if (top_window && (gtk_widget_get_visible(top_window)))
         SetUrgencyHint(top_window, false);
 
     // Return if being called within SetFocus because the focus manager