[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: [Bug 131590] _NET_WM_ICON hint doesn't force using icon of 'most
From: Lubos Lunak <l.lunak () kde ! org>
Date: 2006-07-31 14:42:48
Message-ID: 20060731144248.9215.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=131590
l.lunak kde org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From l.lunak kde org 2006-07-31 16:42 -------
SVN commit 568223 by lunakl:
Pick correctly the best icon size. Also make -1,-1 return the largest
icon and not the first one (makes more sense and saying the first one
is as good as saying a random one).
BUG: 131590
M +10 -5 netwm.cpp
M +1 -1 netwm.h
--- trunk/KDE/kdelibs/kdecore/netwm.cpp #568222:568223
@ -3438,14 +3438,19 @
return result;
}
+ // find the largest icon
result = icons[0];
+ for (int i = 1; i < icons.size(); i++) {
+ if( icons[i].size.width >= result.size.width &&
+ icons[i].size.height >= result.size.height )
+ result = icons[i];
+ }
+ // return the largest icon if w and h are -1
+ if (width == -1 && height == -1) return result;
+
// find the icon that's closest in size to w x h...
- // return the first icon if w and h are -1
- if (width == height && height == -1) return result;
-
- int i;
- for (i = 0; i < icons.size(); i++) {
+ for (int i = 0; i < icons.size(); i++) {
if ((icons[i].size.width >= width &&
icons[i].size.width < result.size.width) &&
(icons[i].size.height >= height &&
--- trunk/KDE/kdelibs/kdecore/netwm.h #568222:568223
@ -1188,7 +1188,7 @
/**
Returns an icon. If width and height are passed, the icon returned will be
the closest it can find (the next biggest). If width and height are omitted,
- then the first icon in the list is returned.
+ then the largest icon in the list is returned.
param width the preferred width for the icon, -1 to ignore
_______________________________________________
Kwin mailing list
Kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic