void RazorTaskBar::wheelEvent(QWheelEvent* event) { XfitMan xf = xfitMan(); QList<Window> winList = xf.getClientList(); int current = winList.indexOf(xf.getActiveAppWindow()); int delta = event->delta() < 0 ? 1 : -1; for (int ix = current + delta; 0 <= ix && ix < winList.size(); ix += delta) { Window window = winList.at(ix); if (xf.acceptWindow(window) && windowOnActiveDesktop(window)) { xf.raiseWindow(window); break; } } }