summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-06 15:14:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-07 06:59:15 +0000
commit25c19f896b327cac4fa4ed248fcc0410a9fe55ab (patch)
tree2bc62604f923d0b595affe0f19f94fffa2634e4a
parent0b92356a6c1844aef9ed49927fa4da310ee5bb2e (diff)
remove dead code in X11SalFrame::SetIcon
ever since commit a11cabb47249257d8b6510fe91063ade03d0c636 Author: Caolán McNamara <caolanm@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 <caolanm@redhat.com> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--vcl/unx/generic/window/salframe.cxx68
1 files changed, 0 insertions, 68 deletions
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 );