[PATCH 1/2] Kill dtwm/cde

Thomas Arnhold thomas at arnhold.org
Wed Jul 20 14:47:26 PDT 2011


---
 vcl/Library_vclplug_gen.mk                        |    1 -
 vcl/inc/unx/cdeint.hxx                            |   47 ----
 vcl/inc/unx/desktops.hxx                          |    3 +-
 vcl/inc/unx/saldisp.hxx                           |    1 -
 vcl/inc/unx/wmadaptor.hxx                         |    1 -
 vcl/unx/generic/app/saldisp.cxx                   |   11 -
 vcl/unx/generic/app/wmadaptor.cxx                 |   68 +------
 vcl/unx/generic/desktopdetect/desktopdetector.cxx |   20 --
 vcl/unx/generic/gdi/cdeint.cxx                    |  237 ---------------------
 vcl/unx/generic/gdi/dtint.cxx                     |   22 --
 vcl/unx/generic/plugadapt/salplug.cxx             |    2 +-
 vcl/unx/generic/window/salframe.cxx               |   28 ---
 12 files changed, 3 insertions(+), 438 deletions(-)
 delete mode 100644 vcl/inc/unx/cdeint.hxx
 delete mode 100644 vcl/unx/generic/gdi/cdeint.cxx

diff --git a/vcl/Library_vclplug_gen.mk b/vcl/Library_vclplug_gen.mk
index d195400..1a7dfc8 100644
--- a/vcl/Library_vclplug_gen.mk
+++ b/vcl/Library_vclplug_gen.mk
@@ -111,7 +111,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_gen,\
     vcl/unx/generic/dtrans/X11_selection \
     vcl/unx/generic/dtrans/X11_service \
     vcl/unx/generic/dtrans/X11_transferable \
-    vcl/unx/generic/gdi/cdeint \
     vcl/unx/generic/gdi/dtint \
     vcl/unx/generic/gdi/gcach_xpeer \
     vcl/unx/generic/gdi/pspgraphics \
diff --git a/vcl/inc/unx/cdeint.hxx b/vcl/inc/unx/cdeint.hxx
deleted file mode 100644
index c2b7d57..0000000
--- a/vcl/inc/unx/cdeint.hxx
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef _SV_CDEINT_HXX
-#define _SV_CDEINT_HXX
-
-#include <unx/dtint.hxx>
-
-class CDEIntegrator : public DtIntegrator
-{
-    friend DtIntegrator* DtIntegrator::CreateDtIntegrator();
-private:
-    CDEIntegrator();
-
-public:
-    virtual ~CDEIntegrator();
-
-    virtual void GetSystemLook( AllSettings& rSettings );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/desktops.hxx b/vcl/inc/unx/desktops.hxx
index de4ebb8..3910db3 100644
--- a/vcl/inc/unx/desktops.hxx
+++ b/vcl/inc/unx/desktops.hxx
@@ -34,8 +34,7 @@ enum DesktopType {
     DESKTOP_UNKNOWN, // unknown desktop, simple WM, etc.
     DESKTOP_GNOME,
     DESKTOP_KDE,
-    DESKTOP_KDE4,
-    DESKTOP_CDE
+    DESKTOP_KDE4
 }; // keep in sync with desktop_strings[] in salplug.cxx
 
 #endif // INCLUDED_VCL_DESKTOPS_HXX
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 214666d..084941c 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -109,7 +109,6 @@ enum SalWM { olwm,		// Open Look
              kwm,		// KDE Desktop Environment
              FourDwm,	// SGI
              vuewm,		// HP
-             dtwm,		// CDE
              winmgr,	// Oracle NC
              twm,
              fvwm,		// ...
diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx
index 1138eed..40f8a5a 100644
--- a/vcl/inc/unx/wmadaptor.hxx
+++ b/vcl/inc/unx/wmadaptor.hxx
@@ -117,7 +117,6 @@ public:
         SAL_USEREVENT,
         SAL_EXTTEXTEVENT,
         SAL_GETTIMEEVENT,
-        DTWM_IS_RUNNING,
         VCL_SYSTEM_SETTINGS,
         XSETTINGS,
         XEMBED,
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 94a75c3..a7ab579 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -876,8 +876,6 @@ void SalDisplay::Init()
         eWindowManager_ = mwm; // naja, eigentlich kwm ...
     else if( XInternAtom( pDisp_, "_OL_WIN_ATTR", True ) )
         eWindowManager_ = olwm;
-    else if( m_pWMAdaptor->getWindowManagerName().EqualsAscii( "Dtwm" ) )
-        eWindowManager_ = dtwm;
 
     // - - - - - - - - - - Properties  - - - - - - - - - - - - -
     const char *pProperties = getenv( "SAL_PROPERTIES" );
@@ -953,11 +951,6 @@ void SalDisplay::Init()
                 eWindowManager_ = FourDwm;
         }
         else
-        if( GetServerVendor() == vendor_hp )
-        {
-            if( otherwm == eWindowManager_ ) eWindowManager_ = dtwm;
-        }
-        else
         if( GetServerVendor() == vendor_hummingbird )
         {
             if (GetVisual(m_nDefaultScreen).GetDepth() == 24)
@@ -977,10 +970,6 @@ void SalDisplay::Init()
             nProperties_ &= ~PROPERTY_SUPPORT_WM_Screen;
             nProperties_ |= PROPERTY_FEATURE_Maximize;
         }
-        else if( dtwm == eWindowManager_ )
-        {
-            nProperties_ &= ~PROPERTY_SUPPORT_WM_ClientPos;
-        }
         else if( pmwm == eWindowManager_ )
         {
             nProperties_ &= ~PROPERTY_SUPPORT_WM_ClientPos;
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 38ed2fa..cfff1b3 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -184,7 +184,6 @@ static const WMAdaptorProtocol aAtomTab[] =
     { "SAL_EXTTEXTEVENT", WMAdaptor::SAL_EXTTEXTEVENT },
     { "SAL_GETTIMEEVENT", WMAdaptor::SAL_GETTIMEEVENT },
     { "VCL_SYSTEM_SETTINGS", WMAdaptor::VCL_SYSTEM_SETTINGS },
-    { "DTWM_IS_RUNNING", WMAdaptor::DTWM_IS_RUNNING },
     { "_XSETTINGS_SETTINGS", WMAdaptor::XSETTINGS },
     { "_XEMBED", WMAdaptor::XEMBED },
     { "_XEMBED_INFO", WMAdaptor::XEMBED_INFO },
@@ -268,48 +267,6 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
     initAtoms();
     getNetWmName(); // try to discover e.g. Sawfish
 
-    // check for dtwm running
-    if( m_aWMAtoms[ DTWM_IS_RUNNING ] )
-    {
-        if (   (XGetWindowProperty( m_pDisplay,
-                                    m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ),
-                                    m_aWMAtoms[ DTWM_IS_RUNNING ],
-                                    0, 1,
-                                    False,
-                                    XA_INTEGER,
-                                    &aRealType,
-                                    &nFormat,
-                                    &nItems,
-                                    &nBytesLeft,
-                                    &pProperty) == 0
-                && nItems)
-               || (XGetWindowProperty( m_pDisplay,
-                                       m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultScreenNumber() ),
-                                       m_aWMAtoms[ DTWM_IS_RUNNING ],
-                                       0, 1,
-                                       False,
-                                       m_aWMAtoms[ DTWM_IS_RUNNING ],
-                                       &aRealType,
-                                       &nFormat,
-                                       &nItems,
-                                       &nBytesLeft,
-                                       &pProperty) == 0
-                   && nItems))
-        {
-            if (*pProperty)
-            {
-                m_aWMName = String(RTL_CONSTASCII_USTRINGPARAM("Dtwm"));
-                m_bTransientBehaviour = false;
-                m_nWinGravity = CenterGravity;
-            }
-            XFree (pProperty);
-        }
-        else if( pProperty )
-        {
-            XFree( pProperty );
-            pProperty = NULL;
-        }
-    }
     if( m_aWMName.Len() == 0 )
     {
         // check for window maker - needs different gravity
@@ -1079,9 +1036,6 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const String& rWMName ) const
     rtl::OString aTitle(rtl::OUStringToOString(rWMName,
         osl_getThreadTextEncoding()));
 
-    if( ! rWMName.Len() && m_aWMName.EqualsAscii( "Dtwm" ) )
-        aTitle = rtl::OString(' ');
-
     ::rtl::OString aWMLocale;
     rtl_Locale* pLocale = NULL;
     osl_getProcessLocale( &pLocale );
@@ -1513,10 +1467,6 @@ void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eTy
         if( ! pReferenceFrame->bMapped_ )
             pFrame->mbTransientForRoot = true;
     }
-    // #110333# in case no one ever sets a title prevent
-    // the Dtwm taking the class instead
-    if( m_aWMName.EqualsAscii( "Dtwm" ) )
-        setWMName( pFrame, String() );
 }
 
 /*
@@ -1675,16 +1625,6 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
                             RevertToNone,
                             CurrentTime
                             );
-            if( m_aWMName.EqualsAscii( "Dtwm" ) )
-            {
-                /*
-                 *  Dtwm will only position  correctly with center gravity
-                 *  and in this case the request actually changes the frame
-                 *  not the shell window
-                 */
-                aTarget = Rectangle( Point( 0, 0 ), aScreenSize );
-                aRestore.Move( -rGeom.nLeftDecoration, -rGeom.nTopDecoration );
-            }
         }
 
         if( pFrame->maRestorePosSize.IsEmpty() )
@@ -1708,11 +1648,6 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
         pFrame->maRestorePosSize = Rectangle();
         pFrame->nWidth_ 			= rGeom.nWidth;
         pFrame->nHeight_			= rGeom.nHeight;
-        if( m_aWMName.EqualsAscii( "Dtwm" ) && pFrame->bMapped_ )
-        {
-            pFrame->maGeometry.nX += rGeom.nLeftDecoration;
-            pFrame->maGeometry.nY += rGeom.nTopDecoration;
-        }
     }
 }
 
@@ -1844,8 +1779,7 @@ void GnomeWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool
 bool WMAdaptor::supportsICCCMPos() const
 {
     return
-        m_aWMName.EqualsAscii( "Sawfish" )
-        || m_aWMName.EqualsAscii( "Dtwm" );
+        m_aWMName.EqualsAscii( "Sawfish" );
 }
 
 /*
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
index ed755fa..a22bdbe 100644
--- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
@@ -227,22 +227,6 @@ static bool is_kde4_desktop( Display* pDisplay )
     return false;
 }
 
-static bool is_cde_desktop( Display* pDisplay )
-{
-    void* pLibrary = NULL;
-
-    Atom nDtAtom = XInternAtom( pDisplay, "_DT_WM_READY", True );
-    OUString aPathName( RTL_CONSTASCII_USTRINGPARAM( "file:///usr/dt/lib/libDtSvc.so" ) );
-    if( nDtAtom && ( pLibrary = osl_loadModule( aPathName.pData, SAL_LOADMODULE_DEFAULT ) ) )
-    {
-        osl_unloadModule( (oslModule)pLibrary );
-        return true;
-    }
-
-    return false;
-}
-
-
 extern "C"
 {
 
@@ -254,8 +238,6 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
     {
         OString aOver( pOverride );
 
-        if ( aOver.equalsIgnoreAsciiCase( "cde" ) )
-            return DESKTOP_CDE;
         if ( aOver.equalsIgnoreAsciiCase( "kde4" ) )
             return DESKTOP_KDE4;
         if ( aOver.equalsIgnoreAsciiCase( "gnome" ) )
@@ -323,8 +305,6 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
         ret = DESKTOP_KDE4;
     else if ( is_gnome_desktop( pDisplay ) )
         ret = DESKTOP_GNOME;
-    else if ( is_cde_desktop( pDisplay ) )
-        ret = DESKTOP_CDE;
     else if ( is_kde_desktop( pDisplay ) )
         ret = DESKTOP_KDE;
     else
diff --git a/vcl/unx/generic/gdi/cdeint.cxx b/vcl/unx/generic/gdi/cdeint.cxx
deleted file mode 100644
index c6d20fb..0000000
--- a/vcl/unx/generic/gdi/cdeint.cxx
+++ /dev/null
@@ -1,237 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include <stdlib.h>
-#include <ctype.h>
-#include <unistd.h>
-
-#include <tools/stream.hxx>
-#include <tools/debug.hxx>
-
-#include <vcl/settings.hxx>
-
-#include <unx/salunx.h>
-#include <unx/saldisp.hxx>
-#include <unx/cdeint.hxx>
-
-CDEIntegrator::CDEIntegrator()
-{
-    meType = DtCDE;
-}
-
-CDEIntegrator::~CDEIntegrator()
-{
-}
-
-static int getHexDigit( const char c )
-{
-    if( c >= '0' && c <= '9' )
-        return (int)(c-'0');
-    else if( c >= 'a' && c <= 'f' )
-        return (int)(c-'a'+10);
-    else if( c >= 'A' && c <= 'F' )
-        return (int)(c-'A'+10);
-    return -1;
-}
-
-
-void CDEIntegrator::GetSystemLook( AllSettings& rSettings )
-{
-    static Color aColors[ 8 ];
-    static sal_Bool bRead  = sal_False;
-    static sal_Bool bValid = sal_False;
-
-    if( ! bRead )
-    {
-        // get used palette from xrdb
-        char **ppStringList = 0;
-        int nStringCount;
-        XTextProperty aTextProperty;
-        aTextProperty.value = 0;
-
-        static Atom nResMgrAtom = XInternAtom( mpDisplay, "RESOURCE_MANAGER", False );
-
-        if( XGetTextProperty( mpDisplay,
-                              RootWindow( mpDisplay, 0 ),
-                              &aTextProperty,
-                              nResMgrAtom )
-            && aTextProperty.value
-            && XTextPropertyToStringList( &aTextProperty, &ppStringList, &nStringCount )
-            )
-        {
-            // format of ColorPalette resource:
-            // *n*ColorPalette: palettefile
-
-            ByteString aLines;
-            int i;
-            for( i=0; i < nStringCount; i++ )
-                aLines += ppStringList[i];
-            for( i = aLines.GetTokenCount( '\n' )-1; i >= 0; i-- )
-            {
-                ByteString aLine = aLines.GetToken( i, '\n' );
-                int nIndex = aLine.Search( "ColorPalette" );
-                if( nIndex != STRING_NOTFOUND )
-                {
-                    int nPos = nIndex;
-
-                    nIndex+=12;
-                    const char* pStr = aLine.GetBuffer() +nIndex;
-                    while( *pStr && isspace( *pStr ) && *pStr != ':' )
-                    {
-                        pStr++;
-                        nIndex++;
-                    }
-                    if( *pStr != ':' )
-                        continue;
-                    pStr++, nIndex++;
-                    for( ; *pStr && isspace( *pStr ); pStr++, nIndex++ )
-                        ;
-                    if( ! *pStr )
-                        continue;
-                    int nIndex2 = nIndex;
-                    for( ; *pStr && ! isspace( *pStr ); pStr++, nIndex2++ )
-                        ;
-                    ByteString aPaletteFile( aLine.Copy( nIndex, nIndex2 - nIndex ) );
-                    // extract number before ColorPalette;
-                    for( ; nPos >= 0 && aLine.GetChar( nPos ) != '*'; nPos-- )
-                        ;
-                    nPos--;
-                    for( ; nPos >= 0 && aLine.GetChar( nPos ) != '*'; nPos-- )
-                        ;
-                    int nNumber = aLine.Copy( ++nPos ).ToInt32();
-
-                    OSL_TRACE( "found palette %d in resource \"%s\"", nNumber, aLine.GetBuffer() );
-
-                    // found no documentation what this number actually means;
-                    // might be the screen number. 0 seems to be the right one
-                    // in most cases.
-                    if( nNumber )
-                        continue;
-
-                    OSL_TRACE( "Palette file is \"%s\".\n", aPaletteFile.GetBuffer() );
-
-                    String aPath( aHomeDir );
-                    aPath.AppendAscii( "/.dt/palettes/" );
-                    aPath += String( aPaletteFile, gsl_getSystemTextEncoding() );
-
-                    SvFileStream aStream( aPath, STREAM_READ );
-                    if( ! aStream.IsOpen() )
-                    {
-                        aPath = String::CreateFromAscii( "/usr/dt/palettes/" );
-                        aPath += String( aPaletteFile, gsl_getSystemTextEncoding() );
-                        aStream.Open( aPath, STREAM_READ );
-                        if( ! aStream.IsOpen() )
-                            continue;
-                    }
-
-                    ByteString aBuffer;
-                    for( nIndex = 0; nIndex < 8; nIndex++ )
-                    {
-                        aStream.ReadLine( aBuffer );
-                        // format is "#RRRRGGGGBBBB"
-
-                        OSL_TRACE( "\t\"%s\".\n", aBuffer.GetBuffer() );
-
-                        if( aBuffer.Len() )
-                        {
-                            const char* pArr = (const char*)aBuffer.GetBuffer()+1;
-                            aColors[nIndex] = Color(
-                                getHexDigit( pArr[1] )
-                                | ( getHexDigit( pArr[0] ) << 4 ),
-                                getHexDigit( pArr[5] )
-                                | ( getHexDigit( pArr[4] ) << 4 ),
-                                getHexDigit( pArr[9] )
-                                | ( getHexDigit( pArr[8] ) << 4 )
-                                );
-
-                            OSL_TRACE( "\t\t%lx\n", aColors[nIndex].GetColor() );
-                        }
-                    }
-
-                    bValid = sal_True;
-                    break;
-                }
-            }
-        }
-
-        if( ppStringList )
-            XFreeStringList( ppStringList );
-        if( aTextProperty.value )
-            XFree( aTextProperty.value );
-    }
-
-
-    StyleSettings aStyleSettings = rSettings.GetStyleSettings();
-    // #i48001# set a default blink rate
-    aStyleSettings.SetCursorBlinkTime( 500 );
-    if (bValid)
-    {
-        aStyleSettings.SetActiveColor( aColors[0] );
-        aStyleSettings.SetActiveColor2( aColors[0] );
-        aStyleSettings.SetActiveBorderColor( aColors[0] );
-
-        aStyleSettings.SetDeactiveColor( aColors[0] );
-        aStyleSettings.SetDeactiveColor2( aColors[0] );
-        aStyleSettings.SetDeactiveBorderColor( aColors[0] );
-
-        Color aActive =
-            aColors[ 0 ].GetBlue() < 128		||
-            aColors[ 0 ].GetGreen() < 128		||
-            aColors[ 0 ].GetRed() < 128
-            ? Color( COL_WHITE ) : Color( COL_BLACK );
-        Color aDeactive =
-            aColors[ 1 ].GetBlue() < 128		||
-            aColors[ 1 ].GetGreen() < 128		||
-            aColors[ 1 ].GetRed() < 128
-            ? Color( COL_WHITE ) : Color( COL_BLACK );
-        aStyleSettings.SetActiveTextColor( aActive );
-        aStyleSettings.SetDeactiveTextColor( aDeactive );
-
-        aStyleSettings.SetDialogTextColor( aDeactive );
-        aStyleSettings.SetMenuTextColor( aDeactive );
-        aStyleSettings.SetMenuBarTextColor( aDeactive );
-        aStyleSettings.SetButtonTextColor( aDeactive );
-        aStyleSettings.SetRadioCheckTextColor( aDeactive );
-        aStyleSettings.SetGroupTextColor( aDeactive );
-        aStyleSettings.SetLabelTextColor( aDeactive );
-        aStyleSettings.SetInfoTextColor( aDeactive );
-
-        aStyleSettings.Set3DColors( aColors[1] );
-        aStyleSettings.SetFaceColor( aColors[1] );
-        aStyleSettings.SetDialogColor( aColors[1] );
-        aStyleSettings.SetMenuColor( aColors[1] );
-        aStyleSettings.SetMenuBarColor( aColors[1] );
-        aStyleSettings.SetCheckedColorSpecialCase( );
-    }
-    rSettings.SetStyleSettings( aStyleSettings );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/gdi/dtint.cxx b/vcl/unx/generic/gdi/dtint.cxx
index df1826d..af0acb7 100644
--- a/vcl/unx/generic/gdi/dtint.cxx
+++ b/vcl/unx/generic/gdi/dtint.cxx
@@ -43,9 +43,6 @@
 
 #include "unx/salunx.h"
 #include <X11/Xatom.h>
-#ifdef USE_CDE
-#include "unx/cdeint.hxx"
-#endif
 #include "unx/dtint.hxx"
 #include "unx/saldisp.hxx"
 #include "unx/saldata.hxx"
@@ -105,29 +102,10 @@ DtIntegrator* DtIntegrator::CreateDtIntegrator()
     {
         OString aOver( pOverride );
 
-#if USE_CDE
-        if( aOver.equalsIgnoreAsciiCase( "cde" ) )
-            return new CDEIntegrator();
-#endif
         if( aOver.equalsIgnoreAsciiCase( "none" ) )
             return new DtIntegrator();
     }
 
-#ifdef USE_CDE
-    void* pLibrary = NULL;
-
-    // check dt type
-    // CDE
-    SalDisplay* pSalDisplay = GetX11SalData()->GetDisplay();
-    Display* pDisplay = pSalDisplay->GetDisplay();
-    Atom nDtAtom = XInternAtom( pDisplay, "_DT_WM_READY", True );
-    if( nDtAtom && ( pLibrary = dlopen( "/usr/dt/lib/libDtSvc.so", DLOPEN_MODE ) ) )
-    {
-        dlclose( pLibrary );
-        return new CDEIntegrator();
-    }
-#endif
-
     // default: generic implementation
     return new DtIntegrator();
 }
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx
index b09ce7c..5bc742d 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -276,7 +276,7 @@ void SalAbort( const XubString& rErrorText )
     exit(-1);
 }
 
-static const char * desktop_strings[] = { "none", "unknown", "GNOME", "KDE", "KDE4", "CDE" };
+static const char * desktop_strings[] = { "none", "unknown", "GNOME", "KDE", "KDE4" };
 
 const OUString& SalGetDesktopEnvironment()
 {
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 4967abe..40e3c56 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -4123,10 +4123,6 @@ long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
             }
             else if( (Atom)pEvent->data.l[0] == rWMAdaptor.getAtom( WMAdaptor::WM_SAVE_YOURSELF ) )
             {
-                bool bSession = rWMAdaptor.getWindowManagerName().EqualsAscii( "Dtwm" );
-
-                if( ! bSession )
-                {
                     if( this == s_pSaveYourselfFrame )
                     {
                         rtl::OString aExec(rtl::OUStringToOString(SessionManagerClient::getExecName(), osl_getThreadTextEncoding()));
@@ -4141,14 +4137,6 @@ long X11SalFrame::HandleClientMessage( XClientMessageEvent *pEvent )
                     else
                         // can only happen in race between WM and window closing
                         XChangeProperty( GetXDisplay(), GetShellWindow(), rWMAdaptor.getAtom( WMAdaptor::WM_COMMAND ), XA_STRING, 8, PropModeReplace, (unsigned char*)"", 0 );
-                }
-                else
-                {
-                    // save open documents; would be good for non Dtwm, too,
-                    // but there is no real Shutdown message in the ancient
-                    // SM protocol; on Dtwm SaveYourself really means Shutdown, too.
-                    IceSalSession::handleOldX11SaveYourself( this );
-                }
             }
         }
     }
@@ -4372,22 +4360,6 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
 
                     if( hPresentationWindow != None && GetShellWindow() == hPresentationWindow )
                         XSetInputFocus( GetXDisplay(), GetShellWindow(), RevertToParent, CurrentTime );
-                    /*  For unknown reasons Dtwm does respect the input_hint
-                     *  set to False, but not when mapping the window. So
-                     *  emulate the correct behaviour and set the focus back
-                     *  to where it most probably should have been.
-                     */
-                    if( (nStyle_ & SAL_FRAME_STYLE_OWNERDRAWDECORATION) &&
-                        mpParent &&
-                        GetDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii( "Dtwm" )
-                        )
-                    {
-                        XSetInputFocus( GetXDisplay(),
-                                        mpParent->GetShellWindow(),
-                                        RevertToParent,
-                                        CurrentTime );
-                        bSetFocus = false;
-                    }
 
                     if( bSetFocus )
                     {
-- 
1.7.6


--------------080504010809040501070005
Content-Type: text/x-patch;
 name="0002-libs-gui-Remove-supportsICCCMPos.-Resize-working-with-Sawfish.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0002-libs-gui-Remove-supportsICCCMPos.-Resize-working-with-S";
 filename*1="awfish.patch"



More information about the LibreOffice mailing list