summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-05-10 15:20:01 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-05-10 15:20:01 +0000
commitc7de7e9ceea4231907a1c465608b89c4d43a4fbf (patch)
treebe6e55da67f5537d1dbd4cd8d56452a013d78fe8 /vcl/unx
parent52cf9b8b5eb4aef0cb4d8951ffff38cd069c5d16 (diff)
INTEGRATION: CWS nwf (1.3.2); FILE MERGED
2004/05/04 14:20:54 pl 1.3.2.5: #i25153# search for gnome-panel to identify gnome 2004/04/26 11:47:43 pl 1.3.2.4: #i28370# fallback to generic plugin if suitable desktop plugin does not exist 2004/03/10 20:49:42 pl 1.3.2.3: merge from vcl20: yield mutex acquisition 2004/03/02 15:10:14 pl 1.3.2.2: enable gnome autodetect 2004/02/27 10:56:17 pl 1.3.2.1: activate gtk plugin for CWS
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/source/plugadapt/salplug.cxx55
1 files changed, 45 insertions, 10 deletions
diff --git a/vcl/unx/source/plugadapt/salplug.cxx b/vcl/unx/source/plugadapt/salplug.cxx
index f388c20830c8..3f22c5161b5c 100644
--- a/vcl/unx/source/plugadapt/salplug.cxx
+++ b/vcl/unx/source/plugadapt/salplug.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: salplug.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: hr $ $Date: 2004-05-10 12:58:24 $
+ * last change: $Author: hr $ $Date: 2004-05-10 16:20:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -171,6 +171,49 @@ static bool is_gnome_desktop( Display* pDisplay )
XFree( pProperties );
}
}
+ if( ! ret )
+ {
+ Atom nUTFAtom = XInternAtom( pDisplay, "UTF8_STRING", True );
+ Atom nNetWMNameAtom = XInternAtom( pDisplay, "_NET_WM_NAME", True );
+ if( nUTFAtom && nNetWMNameAtom )
+ {
+ // another, more expensive check: search for a gnome-panel
+ XLIB_Window aRoot, aParent, *pChildren = NULL;
+ unsigned int nChildren = 0;
+ XQueryTree( pDisplay, DefaultRootWindow( pDisplay ),
+ &aRoot, &aParent, &pChildren, &nChildren );
+ if( pChildren && nChildren )
+ {
+ for( unsigned int i = 0; i < nChildren && ! pRet; i++ )
+ {
+ Atom nType = None;
+ int nFormat = 0;
+ unsigned long nItems = 0, nBytes = 0;
+ unsigned char* pProp = NULL;
+ XGetWindowProperty( pDisplay,
+ pChildren[i],
+ nNetWMNameAtom,
+ 0, 8,
+ False,
+ nUTFAtom,
+ &nType,
+ &nFormat,
+ &nItems,
+ &nBytes,
+ &pProp );
+ if( pProp && nType == nUTFAtom )
+ {
+ OString aWMName( (sal_Char*)pProp );
+ if( aWMName.equalsIgnoreAsciiCase( "gnome-panel" ) )
+ ret = true;
+ }
+ if( pProp )
+ XFree( pProp );
+ }
+ XFree( pChildren );
+ }
+ }
+ }
return ret;
}
@@ -398,14 +441,6 @@ SalInstance *CreateSalInstance()
if( pUsePlugin && *pUsePlugin )
pInst = tryInstance( OUString::createFromAscii( pUsePlugin ) );
-#ifdef ENABLE_GTK_AUTODETECT
- if( ! pInst )
- pInst = tryInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "gtk" ) ) );
-#endif
-
- if( ! pInst )
- pInst = tryInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "kde" ) ) );
-
// fallback to gen
if( ! pInst )
pInst = tryInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "gen" ) ) );