diff --git a/kcmkwin/kwinrules/detectwidget.cpp b/kcmkwin/kwinrules/detectwidget.cpp index 035acc1b45..1def56a9bd 100644 --- a/kcmkwin/kwinrules/detectwidget.cpp +++ b/kcmkwin/kwinrules/detectwidget.cpp @@ -78,19 +78,19 @@ void DetectDialog::readWindow(WId w) emit detectionDone(false); return; } - info = KWindowSystem::windowInfo(w, -1U, -1U); // read everything - if (!info.valid()) { + info.reset(new KWindowInfo(w, -1U, -1U)); // read everything + if (!info->valid()) { emit detectionDone(false); return; } - wmclass_class = info.windowClassClass(); - wmclass_name = info.windowClassName(); - role = info.windowRole(); - type = info.windowType(NET::NormalMask | NET::DesktopMask | NET::DockMask + wmclass_class = info->windowClassClass(); + wmclass_name = info->windowClassName(); + role = info->windowRole(); + type = info->windowType(NET::NormalMask | NET::DesktopMask | NET::DockMask | NET::ToolbarMask | NET::MenuMask | NET::DialogMask | NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask); - title = info.name(); - machine = info.clientMachine(); + title = info->name(); + machine = info->clientMachine(); executeDialog(); } diff --git a/kcmkwin/kwinrules/detectwidget.h b/kcmkwin/kwinrules/detectwidget.h index 6c7e4efac3..efc8980c41 100644 --- a/kcmkwin/kwinrules/detectwidget.h +++ b/kcmkwin/kwinrules/detectwidget.h @@ -77,13 +77,14 @@ private: QByteArray machine; DetectWidget* widget; QScopedPointer grabber; - KWindowInfo info; + QScopedPointer info; }; inline const KWindowInfo& DetectDialog::windowInfo() const { - return info; + Q_ASSERT(!info.isNull()); + return *(info.data()); } } // namespace