|
|
|
@ -1130,13 +1130,20 @@ void SystemTrayApplet::setBackground()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TrayEmbed::TrayEmbed( bool kdeTray, TQWidget* parent )
|
|
|
|
|
: QXEmbed( parent ), kde_tray( kdeTray )
|
|
|
|
|
: QXEmbed( parent ), kde_tray( kdeTray ), m_ensureBackgroundSetTimerCount(0)
|
|
|
|
|
{
|
|
|
|
|
m_ensureBackgroundSetTimer = new TQTimer();
|
|
|
|
|
connect(m_ensureBackgroundSetTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(ensureBackgroundSet()));
|
|
|
|
|
hide();
|
|
|
|
|
m_scaledWidget = new TQWidget(parent);
|
|
|
|
|
m_scaledWidget->hide();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TrayEmbed::~TrayEmbed()
|
|
|
|
|
{
|
|
|
|
|
delete m_ensureBackgroundSetTimer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TrayEmbed::getIconSize(int defaultIconSize)
|
|
|
|
|
{
|
|
|
|
|
TQSize minSize = minimumSizeHint();
|
|
|
|
@ -1170,6 +1177,7 @@ void TrayEmbed::setBackground()
|
|
|
|
|
if (!isHidden())
|
|
|
|
|
{
|
|
|
|
|
XClearArea(x11Display(), embeddedWinId(), 0, 0, 0, 0, True);
|
|
|
|
|
m_ensureBackgroundSetTimerCount = 0;
|
|
|
|
|
ensureBackgroundSet();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1212,5 +1220,16 @@ void TrayEmbed::ensureBackgroundSet()
|
|
|
|
|
XSetWindowBackgroundPixmap(x11Display(), embeddedWinId(), argbpixmap);
|
|
|
|
|
XFreePixmap(x11Display(), argbpixmap);
|
|
|
|
|
XFreeGC(x11Display(), gc);
|
|
|
|
|
|
|
|
|
|
// 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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|