on xenial help sign in
GlobalShortcut: Handle window being set at creation
df1185eDalton Durst
plugins/GlobalShortcut/globalshortcut.cpp+3
@@ -58,6 +58,9 @@ void GlobalShortcut::setActive(bool active)
58
58
59void GlobalShortcut::componentComplete()
59void GlobalShortcut::componentComplete()
60{
60{
61+ if (this->window()) {
62+ QMetaObject::invokeMethod(this, "setupFilterOnWindow", Q_ARG(QQuickWindow*, this->window()));
63+ }
61 connect(this, &QQuickItem::windowChanged, this, &GlobalShortcut::setupFilterOnWindow);
64 connect(this, &QQuickItem::windowChanged, this, &GlobalShortcut::setupFilterOnWindow);
62}
65}
63
66