> On Jan. 16, 2015, 4:13 nachm., Thomas Lübking wrote: > > Wrt the other patches, using NETIcon over there, the requirement in KWin > > and likely libtaskbar (ie. keep this in sync): > > What do you think about extending the API by allowing to optionally feed in > > the required elements? > > > > QIcon KWindowSystem::completeIcon(WId win, int flags, NETWinInfo *nwi = > > nullptr, XWMHints *xhints = nullptr, QString className = QString()); > > > > The function would then (in case nwi is supplied) check passedProperties() > > to see whether icons and/or classname can be fetched from there (unless > > classname is explicitly trumped by the last parameter) > > Eike Hein wrote: > Regarding keeping things in sync: I've prepared a changeset to > libtaskmanager that deletes around 90% of stunningly redundant icon code and > will replace it with a call to KWindowSystem::icons(). It won't pass the > ClassHint flag though to avoid an additional XGetClassHint in KWS since it > has the ClassHint already, so it will do the fallback itself. > > Thomas Lübking wrote: > Ie. you'd benefit from such extended API? > > Do you have a NETWindowInfo or the XWMHints around as well (for a > different purpose, like the input flag or the window group)? > > Martin Gräßlin wrote: > > QIcon KWindowSystem::completeIcon(WId win, int flags, NETWinInfo nwi = > nullptr, XWMHints xhints = nullptr, QString className = QString()); > > I thought about it when implementing it, but I fear we cannot do it as > NETWinInfo is only available on X11. So it's unsuited for the cross-platform > API. Though maybe one could do something with forward declaring it. XWMHints > and the classname shouldn't be needed as both should be possible to take from > NETWinInfo (at least we have a replacement for XWMHints in NETWinInfo, we > just need to add reading out the pixmap hint).
#if Q_OS_USELESS typedef NETWinInfo void; #endif /** NETWinInfo & XWMHints are ignored on non-X11 systems - and so is likely className */ kwindowsystem_useless_os.cpp QIcon KWindowSystem::completeIcon(WId win, int flags, NETWinInfo nwi = nullptr, XWMHints xhints = nullptr, QString className = QString()) { Q_UNUSED(nwi); Q_UNUSED(hints); ... } Ok, maybe I should have read the third sentence as well ;-) About the classname: I meant to be able to override the plain one, resp. to pass one despite not having a sufficient NETWinInfo (so it doesn't have to be fetched again) - Thomas ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/122086/#review74142 ----------------------------------------------------------- On Jan. 16, 2015, 12:55 nachm., Martin Gräßlin wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/122086/ > ----------------------------------------------------------- > > (Updated Jan. 16, 2015, 12:55 nachm.) > > > Review request for KDE Frameworks. > > > Repository: kwindowsystem > > > Description > ------- > > ::icons tries to retrieve all available icon sizes and combine them > into a single QIcon. On the X11 platform this can significantly > reduce the time needed to fetch all available icons compared to the > already existing ::icon methods which return a QPixmap of a specific > size. > > The change includes a new test application "icontest" which shows all > available icons in all available sizes for a window id passed as > command line argument. > > CHANGELOG: New method QIcon KWindowSystem::icons(WId win, int flags) > > > Diffs > ----- > > src/kwindowsystem.h 322322f12dda7279567be8420533ed22cffffd52 > src/kwindowsystem.cpp 65d215b6dfbf4df22e871fd7187fface75abb61b > src/kwindowsystem_p.h 1f01145b5c7efe925fcb8242f92af17b704e01c9 > src/kwindowsystem_p_x11.h 0d4b6ba551776d2fa08030f78226ecdb3c80c889 > src/kwindowsystem_x11.cpp bf958ae63b48424fc412405259f082b740928f9a > tests/CMakeLists.txt ce68cc505a69ea9a3cf645e9ae587bd89abe1648 > tests/icontest.cpp PRE-CREATION > > Diff: https://git.reviewboard.kde.org/r/122086/diff/ > > > Testing > ------- > > > Thanks, > > Martin Gräßlin > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel