lazy setting of xbc properties on qApp

just a wild guess - the crashes showed up
somewhen after the early setting of the property/
X11Info access - if this indeed is the cause, they
should disappear or only appear after actually using
the detect button. We'll see.

CCBUG: 346748
REVIEW: 123777
icc-effect-5.14.5
Thomas Lübking 2015-05-12 21:32:07 +02:00
parent 8ba16371e7
commit 8855f47f34
3 changed files with 2 additions and 8 deletions

View File

@ -171,6 +171,8 @@ QByteArray DetectDialog::selectedMachine() const
void DetectDialog::selectWindow()
{
if (!KWin::Cursor::self()) {
qApp->setProperty("x11Connection", QVariant::fromValue<void*>(QX11Info::connection()));
qApp->setProperty("x11RootWindow", QVariant::fromValue(QX11Info::appRootWindow()));
KWin::Cursor::create(this);
}
// use a dialog, so that all user input is blocked

View File

@ -41,10 +41,6 @@ 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);

View File

@ -245,10 +245,6 @@ KWIN_EXPORT int kdemain(int argc, char* argv[])
app.setApplicationDisplayName(i18n("KWin"));
app.setApplicationName("kwin_rules_dialog");
app.setApplicationVersion("1.0");
if (QX11Info::isPlatformX11()) {
app.setProperty("x11Connection", QVariant::fromValue<void*>(QX11Info::connection()));
app.setProperty("x11RootWindow", QVariant::fromValue(QX11Info::appRootWindow()));
}
bool whole_app = false;
bool id_ok = false;
Window id = None;