[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Legacy App Icons
From:       Martijn Klingens <mklingens () yahoo ! com>
Date:       2001-03-06 19:13:03
[Download RAW message or body]

After some examination of kicker's sources I now have the taskbar working 
again for displaying icons of apps that don't supply their own, based on the 
task's className.
The code already was there, I just fixed two bugs. The original lines read

----------------------------------
// try to load icon via net_wm
_pixmap = KWin::icon(_win, 16, 16, true);

// try to guess the icon from the classhint
if(_pixmap.isNull())
  KGlobal::instance()->iconLoader()->loadIcon(className().lower(),
      KIcon::Small, KIcon::Small, KIcon::DefaultState, 0, true);
----------------------------------

Which should be				

----------------------------------
// try to load icon via net_wm
_pixmap = KWin::icon(_win, 16, 16, true);

// try to guess the icon from the classhint
if(_pixmap.isNull())
  _pixmap = KGlobal::instance()->iconLoader()->loadIcon(className().lower(),
      KIcon::Small, 0, KIcon::DefaultState, 0, true);
----------------------------------

(The last line is different.)

So far so good. I can commit this patch as it seems to do the job without 
side effects.
But I would rather like KWin to take care of this, so the icons in a window's 
title bar, the taskbar's popup menu, the 'alt-tab-menu' and many other places 
are fixed all at the same time.

And looking at kdecore/kwin.cpp, function icon() I can only conclude that I 
don't understand the code there. No comments and lots of X code of which I 
literally know nothing at all.
Can anybody help me out?

Or should I apply the above fix that would make kicker work and then copy 
that code to all other menus and apps as well and not bother with kwin?

TIA,

Martijn

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic