[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.1/kdebase
From: Luboš Luňák <l.lunak () kde ! org>
Date: 2008-08-18 12:54:25
Message-ID: 1219064065.885493.21608.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 848776 by lunakl:
Replace XSetTransientForHint() with KWindowSystem::setMainWindow() to make
it work again.
M +2 -7 apps/kdialog/kdialog.cpp
M +2 -9 apps/konqueror/settings/filetypes/keditfiletype.cpp
M +2 -9 runtime/kpasswdserver/kpasswdserver.cpp
--- branches/KDE/4.1/kdebase/apps/kdialog/kdialog.cpp #848775:848776
@@ -30,6 +30,7 @@
#include <kicondialog.h>
#include <kdirselectdialog.h>
#include <kcolordialog.h>
+#include <kwindowsystem.h>
#include <QtCore/QTimer>
#include <QtGui/QDesktopWidget>
@@ -47,10 +48,6 @@
using namespace std;
-#if defined(Q_WS_X11)
-extern "C" { int XSetTransientForHint( Display *, unsigned long, unsigned long ); }
-#endif // Q_WS_X11
-
// this class hooks into the eventloop and outputs the id
// of shown dialogs or makes the dialog transient for other winids.
// Will destroy itself on app exit.
@@ -78,10 +75,8 @@
QWidget *w = static_cast<QWidget*>(o);
if (print)
cout << "winId: " << w->winId() << endl;
-#ifdef Q_WS_X11
if (id)
- XSetTransientForHint(w->x11Info().display(), w->winId(), id);
-#endif
+ KWindowSystem::setMainWindow(w, id);
deleteLater(); // WinIdEmbedder is not needed anymore after the first dialog was shown
return false;
}
--- branches/KDE/4.1/kdebase/apps/konqueror/settings/filetypes/keditfiletype.cpp #848775:848776
@@ -36,18 +36,13 @@
#include <kservicetypeprofile.h>
#include <kstandarddirs.h>
#include <klocale.h>
+#include <kwindowsystem.h>
// Local
#include "filetypedetails.h"
#include "typeslistitem.h"
-#if defined Q_WS_X11
-#include <QX11Info>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#endif
-
FileTypeDialog::FileTypeDialog( MimeTypeData* mime )
: KDialog( 0 ),
m_mimeTypeData(mime)
@@ -181,14 +176,12 @@
}
FileTypeDialog dlg( mimeTypeData );
-#if defined Q_WS_X11
if( args->isSet( "parent" )) {
bool ok;
long id = QString(args->getOption("parent")).toLong(&ok);
if (ok)
- XSetTransientForHint( QX11Info::display(), dlg.winId(), id );
+ KWindowSystem::setMainWindow( &dlg, id );
}
-#endif
args->clear();
if ( !createType )
dlg.setCaption( i18n("Edit File Type %1", mimeTypeData->name()) );
--- branches/KDE/4.1/kdebase/runtime/kpasswdserver/kpasswdserver.cpp #848775:848776
@@ -34,13 +34,8 @@
#include <kdebug.h>
#include <kpassworddialog.h>
#include <kwallet.h>
+#include <kwindowsystem.h>
-#ifdef Q_WS_X11
-#include <qx11info_x11.h>
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#endif
-
#include <kpluginfactory.h>
#include <kpluginloader.h>
@@ -436,9 +431,7 @@
if (info.getExtraField(AUTHINFO_EXTRAFIELD_ANONYMOUS).isValid ())
dlg.setAnonymousMode(info.getExtraField(AUTHINFO_EXTRAFIELD_ANONYMOUS).toBool());
-#ifdef Q_WS_X11
- XSetTransientForHint( QX11Info::display(), dlg.winId(), request->windowId);
-#endif
+ KWindowSystem::setMainWindow(&dlg, request->windowId);
dlgResult = dlg.exec();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic