ui: Window focus event sent when application changes state instead of main window

* Fixes tooltip disappearing when clicked on Windows
This commit is contained in:
Eberhard Graether
2017-08-01 19:15:10 +02:00
parent 96c68c4d0b
commit 63c81e27a2
4 changed files with 13 additions and 16 deletions
-15
View File
@@ -45,7 +45,6 @@
#include "utility/messaging/type/MessageSearch.h"
#include "utility/messaging/type/MessageUndo.h"
#include "utility/messaging/type/MessageWindowClosed.h"
#include "utility/messaging/type/MessageWindowFocus.h"
#include "utility/messaging/type/MessageZoom.h"
#include "utility/ResourcePaths.h"
#include "utility/tracing.h"
@@ -346,20 +345,6 @@ void QtMainWindow::setContentEnabled(bool enabled)
}
}
bool QtMainWindow::event(QEvent* event)
{
if (event->type() == QEvent::WindowActivate)
{
MessageWindowFocus(true).dispatch();
}
else if (event->type() == QEvent::WindowDeactivate)
{
MessageWindowFocus(false).dispatch();
}
return QMainWindow::event(event);
}
void QtMainWindow::keyPressEvent(QKeyEvent* event)
{
switch (event->key())