[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets/pager
From: Marco Martin <notmart () gmail ! com>
Date: 2008-12-02 10:24:45
Message-ID: 1228213485.758621.5399.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 891502 by mart:
turns out the previous thing i did here was pretty wron, now revert that
and just check if the index is withing bounds
M +3 -7 pager.cpp
--- trunk/KDE/kdebase/workspace/plasma/applets/pager/pager.cpp #891501:891502
@@ -959,14 +959,10 @@
for (int i = 0; i < m_windowRects.count(); i++) {
for (int j = 0; j < m_windowRects[i].count(); j++) {
QRect rect = m_windowRects[i][j].second;
- int currentDesktop = qMax(m_currentDesktop, 0);
- //desktops starts from 0 or from 1?
- if (KWindowSystem::desktopName(0) == QString()) {
- currentDesktop = qMax(currentDesktop - 1, 0);
- }
-
- if (m_rects.size() > currentDesktop && m_rects[currentDesktop].contains(rect)) {
+ if (m_currentDesktop > 0 &&
+ m_currentDesktop <= m_rects.count() &&
+ m_rects[m_currentDesktop-1].contains(rect)) {
if (m_activeWindows.contains(rect)) {
painter->setBrush(activeWindowBrushActiveDesk);
painter->setPen(activeWindowPen);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic