Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mainwindow.cpp: only pass event to view if not in focus
Since both MainWindow and the view have the StrongFocus policy, if the view has the focus then the view is already receiving the keyPressEvent and the keyReleaseEvent from the Qt Engine, in that case the MainWindow shouldn't send the keyPressEvent or the keyReleaseEvent to the view, since MainWindow does that, then the view gets a double report of that event. However if the view does not have focus, and if the MainWindow does, it should send the event to the view, including in the case where hotkeys are disabled in the MainWindow. In addition to that view == view->page()->view() so we don't need to set StrongFocus policy for both of those views since they are in fact the same.
- Loading branch information