summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-04-22 10:33:28 +0000
committerOliver Bolte <obo@openoffice.org>2005-04-22 10:33:28 +0000
commitc345f434ce87e8a697522a67ec71388ccf34f929 (patch)
tree1cb2429aa30e9c0645bb2aa1c9d342ab0dbf22f9 /vcl
parentf5df9bec72fe059582c41d3a39730b08f524fec4 (diff)
INTEGRATION: CWS kdefixes02 (1.5.4); FILE MERGED
2005/04/18 09:37:29 kendy 1.5.4.1: #i47401# Remove the necessity to build with --enable-libsn to have startup notification working with KDE vclplug.
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/kde/kdedata.cxx57
1 files changed, 19 insertions, 38 deletions
diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx
index ff8b35983f5e..9002b4633e6f 100644
--- a/vcl/unx/kde/kdedata.cxx
+++ b/vcl/unx/kde/kdedata.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: kdedata.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: hr $ $Date: 2005-04-08 16:17:04 $
+ * last change: $Author: obo $ $Date: 2005-04-22 11:33:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -112,16 +112,22 @@
#endif
/***************************************************************************
- * class KDEXLib *
+ * class SalKDEDisplay *
***************************************************************************/
-class KDEXLib : public SalXLib
+SalKDEDisplay::SalKDEDisplay( Display* pDisp, Visual* pVisual, Colormap aColMap )
+ : SalX11Display( pDisp, pVisual, aColMap, false )
+{
+}
+
+SalKDEDisplay::~SalKDEDisplay()
{
-public:
- KDEXLib() : SalXLib() {}
- virtual ~KDEXLib() {}
- virtual void Init();
-};
+ KStartupInfo::appStarted();
+}
+
+/***************************************************************************
+ * class KDEXLib *
+ ***************************************************************************/
void KDEXLib::Init()
{
@@ -174,39 +180,14 @@ void KDEXLib::Init()
KCmdLineArgs::init( nFakeArgc, pFakeArgv, kAboutData );
- // Do not let KApplication eat the DESKTOP_STARTUP_ID
- char *pDesktopStartupId = NULL;
- char *pEnv = getenv( "DESKTOP_STARTUP_ID" );
- if ( pEnv )
- {
- pDesktopStartupId = strdup( pEnv );
- unsetenv( "DESKTOP_STARTUP_ID" );
- }
-
KApplication::disableAutoDcopRegistration();
- KStartupInfo::disableAutoAppStartedSending();
new KApplication();
- // Now set DESKTOP_STARTUP_ID for the VCL initialization
- if ( pDesktopStartupId )
- {
- setenv( "DESKTOP_STARTUP_ID", pDesktopStartupId, 1 );
- free( pDesktopStartupId );
- }
-
Display* pDisp = QPaintDevice::x11AppDisplay();
- XVisualInfo aVI;
- Colormap aColMap;
- int nScreen = DefaultScreen( pDisp );
- if( SalDisplay::BestVisual( pDisp, nScreen, aVI ) ) // DefaultVisual
- aColMap = DefaultColormap( pDisp, nScreen );
- else
- aColMap = XCreateColormap( pDisp,
- RootWindow( pDisp, nScreen ),
- aVI.visual,
- AllocNone );
-
- SalDisplay *pSalDisplay = new SalX11Display( pDisp, aVI.visual, aColMap );
+
+ SalDisplay *pSalDisplay = new SalKDEDisplay( pDisp,
+ static_cast< Visual * >( QPaintDevice::x11AppVisual() ),
+ QPaintDevice::x11AppColormap() );
pInputMethod->CreateMethod( pDisp );
pInputMethod->AddConnectionWatch( pDisp, (void*)this );