[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/konqueror/client
From: Luboš Luňák <l.lunak () kde ! org>
Date: 2003-01-06 13:15:23
[Download RAW message or body]
CVS commit by lunakl:
kfmclient may be running without QApplication (and qt_xdisplay()), so
open explicitly the connection to XServer if needed.
M +17 -3 kfmclient.cc 1.91
--- kdebase/konqueror/client/kfmclient.cc #1.90:1.91
@@ -46,4 +46,6 @@
#include "KDesktopIface_stub.h"
+#include <X11/Xlib.h>
+
static const char appName[] = "kfmclient";
@@ -220,5 +222,11 @@ bool clientApp::createNewWindow(const KU
data.addPid( 0 ); // say there's another process for this ASN with unknown PID
data.setHostname(); // ( no need to bother to get this konqy's PID )
- KStartupInfo::sendChange( id, data );
+ Display* dpy = qt_xdisplay();
+ if( dpy == NULL ) // we may be running without QApplication here
+ dpy = XOpenDisplay( NULL );
+ if( dpy != NULL )
+ KStartupInfo::sendChangeX( dpy, id, data );
+ if( dpy != NULL && dpy != qt_xdisplay())
+ XCloseDisplay( dpy );
}
else
@@ -283,5 +291,11 @@ bool clientApp::openProfile( const QStri
sidata.addPid( 0 ); // say there's another process for this ASN with unknown PID
sidata.setHostname(); // ( no need to bother to get this konqy's PID )
- KStartupInfo::sendChange( id, sidata );
+ Display* dpy = qt_xdisplay();
+ if( dpy == NULL ) // we may be running without QApplication here
+ dpy = XOpenDisplay( NULL );
+ if( dpy != NULL )
+ KStartupInfo::sendChangeX( dpy, id, sidata );
+ if( dpy != NULL && dpy != qt_xdisplay())
+ XCloseDisplay( dpy );
return true;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic