Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

CDE and Dtwm are pretty outdated and are only standard on HP-UX. As we killed main parts of HP-UX support it would be no problem to kill Dtwm/CDE as well. I've attached the patches. I would like to know what you think about killing it.

In patch 0002... I've removed some Sawfish extra handling as resizing is correctly working out of the box with newer Sawfish versions (checked it with 1.8.1).

Thomas
From 716757b7789877575784b68c32c52603ea4baa23 Mon Sep 17 00:00:00 2001
From: Thomas Arnhold <thomas@arnhold.org>
Date: Wed, 20 Jul 2011 23:52:21 +0200
Subject: [PATCH] Kill dtwm/cde

---
 extras/util/target.pmk |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/extras/util/target.pmk b/extras/util/target.pmk
index 4491247..cec58f9 100644
--- a/extras/util/target.pmk
+++ b/extras/util/target.pmk
@@ -244,9 +244,6 @@ FONTS_TFM_TARGET                = fontunxtfm
 FONTS_PPDS_TARGET               = fontunxppds
 FONTS_PSSOFTFONTS_TARGET        = fontunxpssoft
 
-CDE_ALL_TARGET                  = cde
-CDE_ROOT_TARGET                 = cderoot
-
 KDE_APPLNK_TARGET               = kdeapplnk
 KDE_ICONS_TARGET                = kdeicons
 KDE_ICONS_MINI_TARGET           = kdemini
-- 
1.7.6

From 7e7607b278de978429de23794bfc905c00a807b5 Mon Sep 17 00:00:00 2001
From: Thomas Arnhold <thomas@arnhold.org>
Date: Wed, 20 Jul 2011 23:52:29 +0200
Subject: [PATCH] Kill dtwm/cde

---
 shell/source/unix/exec/shellexec.cxx |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
index 1bbc2fd..a9f06f1 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -221,12 +221,6 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& 
aPar
             {
                 aBuffer.append(aDesktopEnvironment);
                 aBuffer.append("-");
-
-                /* CDE requires file urls to be decoded */                
-                if ( m_aDesktopEnvironment.equals("CDE") && 0 == aURL.compareToAscii("file://", 7) 
)
-                {
-                    aURL = rtl::Uri::decode(aURL, rtl_UriDecodeWithCharset, 
osl_getThreadTextEncoding());
-                }
             }
         }
              
-- 
1.7.6

From b2f2567b186697dc31108afcdfc48c02833ae11e Mon Sep 17 00:00:00 2001
From: Thomas Arnhold <thomas@arnhold.org>
Date: Wed, 20 Jul 2011 23:47:26 +0200
Subject: [PATCH 1/2] Kill dtwm/cde

---
 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

From 74a610b7ae90038054ae7124962cda1385bb60f3 Mon Sep 17 00:00:00 2001
From: Thomas Arnhold <thomas@arnhold.org>
Date: Thu, 21 Jul 2011 00:15:07 +0200
Subject: [PATCH 2/2] Remove supportsICCCMPos. Resize working with Sawfish
 anyway.

---
 vcl/inc/unx/wmadaptor.hxx           |    6 ------
 vcl/unx/generic/app/wmadaptor.cxx   |   21 ---------------------
 vcl/unx/generic/window/salframe.cxx |   12 +-----------
 3 files changed, 1 insertions(+), 38 deletions(-)

diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx
index 40f8a5a..90e5ce0 100644
--- a/vcl/inc/unx/wmadaptor.hxx
+++ b/vcl/inc/unx/wmadaptor.hxx
@@ -322,12 +322,6 @@ public:
     Atom getAtom( WMAtom eAtom ) const
     { return m_aWMAtoms[ eAtom ]; }
 
-    /*
-     * supports correct positioning
-     */
-
-    virtual bool supportsICCCMPos () const;
-
     int getPositionWinGravity () const
     { return m_nWinGravity; }
     int getInitWinGravity() const
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index cfff1b3..2b4290b 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -73,7 +73,6 @@ public:
     virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = 
true ) const;
     virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const;
     virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int 
nDecorationFlags, X11SalFrame* pTransientFrame = NULL ) const;
-    virtual bool supportsICCCMPos() const;
     virtual void enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const;
     virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const;
     virtual void showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const;
@@ -1773,26 +1772,6 @@ void GnomeWMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, 
bool
 }
 
 /*
- *  WMAdaptor::supportsICCCMPos
- */
-
-bool WMAdaptor::supportsICCCMPos() const
-{
-    return
-        m_aWMName.EqualsAscii( "Sawfish" );
-}
-
-/*
- *  NetWMAdaptor::supportsICCCMPos
- */
-
-bool NetWMAdaptor::supportsICCCMPos() const
-{
-    return true;
-}
-
-
-/*
  *  WMAdaptor::enableAlwaysOnTop
  */
 void WMAdaptor::enableAlwaysOnTop( X11SalFrame*, bool /*bEnable*/ ) const
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 40e3c56..7405387 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -1752,17 +1752,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState )
                     aPosSize.Move( 0, (long)aGeom.nTopDecoration - (long)aPosSize.Top() );
             }
 
-            // resize with new args
-            if (pWM->supportsICCCMPos())
-            {
-                if( mpParent )
-                    aPosSize.Move( -mpParent->maGeometry.nX,
-                -mpParent->maGeometry.nY );
-                SetPosSize( aPosSize );
-                bDefaultPosition_ = False;
-            }
-            else
-                SetPosSize( 0, 0, aPosSize.GetWidth(), aPosSize.GetHeight(), 
SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
+            SetPosSize( 0, 0, aPosSize.GetWidth(), aPosSize.GetHeight(), SAL_FRAME_POSSIZE_WIDTH | 
SAL_FRAME_POSSIZE_HEIGHT );
         }
     }
 
-- 
1.7.6


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.