summaryrefslogtreecommitdiffstats
path: root/kicker/applets/systemtray/systemtrayapplet.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-05-03 15:55:11 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-05-03 15:55:11 -0500
commit3cce16c2543ebd7441477b466b35c89333eef28c (patch)
treecc54cc6cf5bdcaf59b96318400657be53efdca74 /kicker/applets/systemtray/systemtrayapplet.cpp
parent667839ee6560a10aca54885dbf8951b77bdc21b2 (diff)
downloadtdebase-3cce16c2543ebd7441477b466b35c89333eef28c.tar.gz
tdebase-3cce16c2543ebd7441477b466b35c89333eef28c.zip
Properly fix task tray background glitches
Ensure session is fully locked before switching to new VT when lock is requested
Diffstat (limited to 'kicker/applets/systemtray/systemtrayapplet.cpp')
-rw-r--r--kicker/applets/systemtray/systemtrayapplet.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/kicker/applets/systemtray/systemtrayapplet.cpp b/kicker/applets/systemtray/systemtrayapplet.cpp
index 542ac42d0..b91dafd27 100644
--- a/kicker/applets/systemtray/systemtrayapplet.cpp
+++ b/kicker/applets/systemtray/systemtrayapplet.cpp
@@ -1130,10 +1130,8 @@ void SystemTrayApplet::setBackground()
TrayEmbed::TrayEmbed( bool kdeTray, TQWidget* parent )
- : QXEmbed( parent ), kde_tray( kdeTray ), m_ensureBackgroundSetTimerCount(0)
+ : QXEmbed( parent ), kde_tray( kdeTray )
{
- m_ensureBackgroundSetTimer = new TQTimer();
- connect(m_ensureBackgroundSetTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(ensureBackgroundSet()));
hide();
m_scaledWidget = new TQWidget(parent);
m_scaledWidget->hide();
@@ -1141,7 +1139,7 @@ TrayEmbed::TrayEmbed( bool kdeTray, TQWidget* parent )
TrayEmbed::~TrayEmbed()
{
- delete m_ensureBackgroundSetTimer;
+ //
}
void TrayEmbed::getIconSize(int defaultIconSize)
@@ -1164,20 +1162,19 @@ void TrayEmbed::setBackground()
{
const TQPixmap *pbg = parentWidget()->backgroundPixmap();
- if (pbg)
- {
+ if (pbg) {
TQPixmap bg(width(), height());
bg.fill(parentWidget(), pos());
setPaletteBackgroundPixmap(bg);
setBackgroundOrigin(WidgetOrigin);
}
- else
+ else {
unsetPalette();
+ }
if (!isHidden())
{
XClearArea(x11Display(), embeddedWinId(), 0, 0, 0, 0, True);
- m_ensureBackgroundSetTimerCount = 0;
ensureBackgroundSet();
}
}
@@ -1211,8 +1208,7 @@ void TrayEmbed::ensureBackgroundSet()
int g = int( tqGreen( l ) );
int b = int( tqBlue( l ) );
int a = int( tqAlpha( l ) );
- ls[x] = tqRgba( r, g, b, a );
- XSetForeground(x11Display(), gc, (r << 16) | (g << 8) | b );
+ XSetForeground(x11Display(), gc, (a << 24) | (r << 16) | (g << 8) | b );
XDrawPoint(x11Display(), argbpixmap, gc, x, y);
}
}
@@ -1223,13 +1219,5 @@ void TrayEmbed::ensureBackgroundSet()
// Repaint
XClearArea(x11Display(), embeddedWinId(), 0, 0, 0, 0, True);
-
- // HACK
- // Clear background artifacts in first available timeslot after initial icon display
- if (m_ensureBackgroundSetTimerCount < 1) {
- m_ensureBackgroundSetTimerCount++;
- m_ensureBackgroundSetTimer->stop();
- m_ensureBackgroundSetTimer->start(0, TRUE);
- }
}
}