Version: (using KDE Devel) OS: Linux When the taskbar's appearance is set to "For Transparency", the CPU load is high, for example by running make in the background and there are a few windows open, the taskbar buttons produce strange effects when the mouse is moved over them. The cause seems to be the high CPU load, the taskbar button focus/unfocus events are queued up fast but can not be processed in time. The "Elegant" appearance seems to handle this fine.
can you please describe these "strange effects", or even screenshot them for me? the reason for the slow downs, btw, will be the ShadowEngine. it's not the most efficient piece of code out there =/ do you see the problem when quickly skating the mouse back and forth over the buttons (something people don't usually do unless checking for bugs ;) or when just passing the mouse over the taskbar casually? if just casual use causes this, perhaps i could add in some code to compress out/in events so they aren't needlessly triggered. this may be a good idea in any case .. heh.
On Wednesday 06 July 2005 19:32, Aaron J.Seigo wrote: >can you please describe these "strange effects", or even screenshot them for me? I'll try to attach a screenshot. > do you see the problem when quickly skating the mouse back and forth over > the buttons (something people don't usually do unless checking for bugs ;) > or when just passing the mouse over the taskbar casually? if just casual > use causes this, perhaps i could add in some code to compress out/in events > so they aren't needlessly triggered. Under high CPU load, I see this effect even when passing the mouse over the taskbar casually, the effect is very visible then (I was not checking for bugs or something like this). Under low CPU load, I have to skate the mouse back and forth quickly to see the effect.
Created attachment 11700 [details] Screenshot This screenshot shows that 3 taskbar buttons are activated, although only one should be at any time. What the screenshot of course can not show is the massive amount of flicker while moving the mouse.
side note: kshadowengine, which produces the halo'd text, sucks. it's very, very inneficient
*** Bug 115955 has been marked as a duplicate of this bug. ***
*** Bug 118166 has been marked as a duplicate of this bug. ***
*** Bug 132546 has been marked as a duplicate of this bug. ***
SVN commit 574691 by kling: Don't create a huge pixmap for every shadow we draw. Makes the "for transparency" taskbar style a *whole* lot faster. BUG: 108603 M +1 -1 taskbar.cpp --- branches/KDE/3.5/kdebase/kicker/taskbar/taskbar.cpp #574690:574691 @@ -1134,7 +1134,7 @@ // get a transparent pixmap QPainter pixPainter; - QPixmap textPixmap(width(), height()); + QPixmap textPixmap(tr.size()); textPixmap.fill(QColor(0,0,0)); textPixmap.setMask(textPixmap.createHeuristicMask(true));
SVN commit 574698 by kling: Okay, I was a bit eager with the last commit, we have to modify the surroundings a bit to make this work perfectly. CCBUG: 108603 M +4 -5 taskbar.cpp M +1 -2 taskbar.h M +2 -2 taskcontainer.cpp --- branches/KDE/3.5/kdebase/kicker/taskbar/taskbar.cpp #574697:574698 @@ -1114,8 +1114,7 @@ } // taken from mtaskbar, by Sebastian Wolff -void TaskBar::drawShadowText(QPainter &p, QRect tr, int tf, const QString & str, - int len, QRect * brect, QTextParag ** internal) +void TaskBar::drawShadowText(QPainter &p, const QRect &tr, int tf, const QString &str, const QSize &size) { // get the color of the shadow: white for dark text, black for bright text QPen textPen = p.pen(); @@ -1134,7 +1133,7 @@ // get a transparent pixmap QPainter pixPainter; - QPixmap textPixmap(tr.size()); + QPixmap textPixmap(size); textPixmap.fill(QColor(0,0,0)); textPixmap.setMask(textPixmap.createHeuristicMask(true)); @@ -1143,7 +1142,7 @@ pixPainter.begin(&textPixmap); pixPainter.setPen(white); pixPainter.setFont(p.font()); // get the font from the root painter - pixPainter.drawText( tr, tf, str, len, brect, internal ); + pixPainter.drawText(tr, tf, str); pixPainter.end(); if (!m_textShadowEngine) @@ -1161,7 +1160,7 @@ // return p.drawImage(0, 0, img); - p.drawText(tr, tf, str, len, brect, internal); + p.drawText(tr, tf, str); } QImage* TaskBar::blendGradient(const QSize& size) --- branches/KDE/3.5/kdebase/kicker/taskbar/taskbar.h #574697:574698 @@ -61,8 +61,7 @@ bool sortByDesktop() const { return m_sortByDesktop; } bool showAllWindows() const { return m_showAllWindows; } - void drawShadowText(QPainter &p, QRect tr, int tf, const QString & str, - int len = -1, QRect* brect = 0, QTextParag** internal = 0); + void drawShadowText(QPainter &p, const QRect &tr, int tf, const QString &str, const QSize &size); QImage* blendGradient(const QSize& size); --- branches/KDE/3.5/kdebase/kicker/taskbar/taskcontainer.cpp #574697:574698 @@ -688,7 +688,7 @@ if (halo) { - taskBar->drawShadowText(tp, tr, textFlags, text); + taskBar->drawShadowText(tp, tr, textFlags, text, size()); } else { @@ -708,7 +708,7 @@ if (halo) { - taskBar->drawShadowText(*p, tr, textFlags, text); + taskBar->drawShadowText(*p, tr, textFlags, text, size()); } else {