Commit 1f3ba9b7 authored by David Faure's avatar David Faure

Port to non-deprecated KWindowSystem API

parent f0ae105a
......@@ -142,7 +142,8 @@ KCMShellMultiDialog::KCMShellMultiDialog(KPageDialog::FaceType dialogFace, QWidg
void KCMShellMultiDialog::activate(const QByteArray& asn_id)
{
#ifdef HAVE_X11
KStartupInfo::setNewStartupId(this, asn_id);
setAttribute(Qt::WA_NativeWindow, true);
KStartupInfo::setNewStartupId(windowHandle(), asn_id);
#endif
}
......
......@@ -423,8 +423,10 @@ static int startApp(QCommandLineParser& p)
//Attach dialog
#ifdef HAVE_X11
if(attach)
KWindowSystem::setMainWindow(&dlg, (WId)winid);
if(attach) {
dlg.setAttribute(Qt::WA_NativeWindow, true);
KWindowSystem::setMainWindow(dlg.windowHandle(), (WId)winid);
}
#endif
int ret = dlg.exec();
if (ret == KDEsuDialog::Rejected)
......
......@@ -193,8 +193,10 @@ int main(int argc, char ** argv)
if( parser.isSet( QStringLiteral("parent") )) {
bool ok;
long id = parser.value(QStringLiteral("parent")).toLong(&ok);
if (ok)
KWindowSystem::setMainWindow( &dlg, (WId)id );
if (ok) {
dlg.setAttribute(Qt::WA_NativeWindow, true);
KWindowSystem::setMainWindow(dlg.windowHandle(), (WId)id);
}
}
if ( !createType )
dlg.setWindowTitle( i18n("Edit File Type %1", mimeTypeData->name()) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment