[kcmkwin/rules] Set dynamic property for x11Connection and x11RootWindow
Needed by kwinglobals which gets used internally through DetectWidget. BUG: 345339
This commit is contained in:
parent
85d87297b0
commit
305387ec3a
1 changed files with 5 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
|||
#include <KLocalizedString>
|
||||
#include <kaboutdata.h>
|
||||
#include <QtDBus/QtDBus>
|
||||
#include <QX11Info>
|
||||
|
||||
#include "ruleslist.h"
|
||||
#include <KPluginFactory>
|
||||
|
@ -40,6 +41,10 @@ KCMRules::KCMRules(QWidget *parent, const QVariantList &)
|
|||
: KCModule(parent)
|
||||
, config("kwinrulesrc")
|
||||
{
|
||||
if (QX11Info::isPlatformX11()) {
|
||||
qApp->setProperty("x11Connection", QVariant::fromValue<void*>(QX11Info::connection()));
|
||||
qApp->setProperty("x11RootWindow", QVariant::fromValue(QX11Info::appRootWindow()));
|
||||
}
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue