Stop ignoring the Firefox Page Bookmarked window, OpenOffice/LibreOffice context menus and possibly other cases.
In eventHandler.shouldAcceptEvent, as well as testing whether the window is a descendant of the foreground window, also check whether it's root owner is a descendant of the foreground.
Re #3899, #3905.