12a4923959
Instead of passing the macro based Predicate to findUnmanaged it now expects a function which can be passed to std::find_if. Existing code like: xcb_window_t window; // our test window Unmanaged *u = findUnmanaged(WindowMatchPredicated(window)); becomes: Unmanaged *u = findUnmanaged([window](const Unmanaged *u) { return u->window() == window; }); In addition an overload is added which takes the window id to cover the common case to search for an Unmanaged by its ID. The above example becomes: Unmanaged *u = findUnmanaged(window); The advantage is that it is way more flexible and has the logic what to check for directly with the code and not hidden in the macro definition. |
||
---|---|---|
.. | ||
autotests | ||
qml | ||
clientmodel.cpp | ||
clientmodel.h | ||
CMakeLists.txt | ||
desktopchain.cpp | ||
desktopchain.h | ||
desktopmodel.cpp | ||
desktopmodel.h | ||
kwindesktopswitcher.desktop | ||
kwinwindowswitcher.desktop | ||
switcheritem.cpp | ||
switcheritem.h | ||
tabbox.cpp | ||
tabbox.h | ||
tabboxconfig.cpp | ||
tabboxconfig.h | ||
tabboxhandler.cpp | ||
tabboxhandler.h |