vcl/unx/generic/window/salframe.cxx | 68 ------------------------------------ 1 file changed, 68 deletions(-)
New commits: commit 25c19f896b327cac4fa4ed248fcc0410a9fe55ab Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Mar 6 15:14:08 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Mar 7 06:59:15 2023 +0000 remove dead code in X11SalFrame::SetIcon ever since commit a11cabb47249257d8b6510fe91063ade03d0c636 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jan 11 12:22:17 2023 +0000 rely on support for NET_WM_ICON found by clang-tidy dead-code Change-Id: I4b762361a7937d087dab8c5cb0f57131ce3650d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148346 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 4721c9c96c12..528bb91e065a 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -915,74 +915,6 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon ) mnIconID = nIcon; - XIconSize *pIconSize = nullptr; - int nSizes = 0; - int iconSize = 32; - if ( XGetIconSizes( GetXDisplay(), GetDisplay()->GetRootWindow( m_nXScreen ), &pIconSize, &nSizes ) ) - { -#if OSL_DEBUG_LEVEL > 1 - SAL_INFO("vcl.window", "X11SalFrame::SetIcon(): found " - << nSizes - << " IconSizes:"); -#endif - int i; - for( i=0; i<nSizes; i++) - { - // select largest supported icon - if( pIconSize[i].max_width > iconSize ) - { - iconSize = pIconSize[i].max_width; - } - -#if OSL_DEBUG_LEVEL > 1 - SAL_INFO("vcl.window", "min: " - << pIconSize[i].min_width - << ", " - << pIconSize[i].min_height); - SAL_INFO("vcl.window", "max: " - << pIconSize[i].max_width - << ", " - << pIconSize[i].max_height); - SAL_INFO("vcl.window", "inc: " - << pIconSize[i].width_inc - << ", " - << pIconSize[i].height_inc); -#endif - } - - XFree( pIconSize ); - } - else - { - const OUString& rWM( pDisplay_->getWMAdaptor()->getWindowManagerName() ); - if( rWM == "KWin" ) // assume KDE is running - iconSize = 48; - static bool bGnomeIconSize = false; - static bool bGnomeChecked = false; - if( ! bGnomeChecked ) - { - bGnomeChecked=true; - int nCount = 0; - Atom* pProps = XListProperties( GetXDisplay(), - GetDisplay()->GetRootWindow( m_nXScreen ), - &nCount ); - for( int i = 0; i < nCount && !bGnomeIconSize; i++ ) - { - char* pName = XGetAtomName( GetXDisplay(), pProps[i] ); - if( pName ) - { - if( !strcmp( pName, "GNOME_PANEL_DESKTOP_AREA" ) ) - bGnomeIconSize = true; - XFree( pName ); - } - } - if( pProps ) - XFree( pProps ); - } - if( bGnomeIconSize ) - iconSize = 48; - } - NetWmIconData netwm_icon; CreateNetWmAppIcon( nIcon, netwm_icon );