mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
system_tray: fix tray widget not visible
Change-Id: I0ffb840b30ba5be179a2e3c6cb41c71108c895b7
This commit is contained in:
parent
46775c546f
commit
3ff0ce241e
Notes:
Deepin Code Review
2017-06-12 20:17:15 +08:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: 石博文 <sbw@sbw.so> Submitted-by: 石博文 <sbw@sbw.so> Submitted-at: Mon, 12 Jun 2017 20:17:09 +0800 Reviewed-on: https://cr.deepin.io/23779 Project: dde/dde-dock Branch: refs/heads/master
@ -26,6 +26,7 @@ void ContainerItem::setDropping(const bool dropping)
|
||||
void ContainerItem::addItem(DockItem * const item)
|
||||
{
|
||||
m_containerWidget->addWidget(item);
|
||||
item->setVisible(true);
|
||||
}
|
||||
|
||||
void ContainerItem::removeItem(DockItem * const item)
|
||||
|
@ -86,11 +86,14 @@ void TrayWidget::paintEvent(QPaintEvent *e)
|
||||
{
|
||||
Q_UNUSED(e);
|
||||
|
||||
const QPoint p(width() / 2 - iconSize / 2, height() / 2 - iconSize / 2);
|
||||
// const QPoint p(width() / 2 - iconSize / 2, height() / 2 - iconSize / 2);
|
||||
|
||||
QPainter painter;
|
||||
painter.begin(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
#ifdef QT_DEBUG
|
||||
painter.fillRect(rect(), Qt::red);
|
||||
#endif
|
||||
|
||||
// m_image = getImageNonComposite();
|
||||
// if (!m_image.isNull()) {
|
||||
@ -344,6 +347,7 @@ void TrayWidget::sendClick(uint8_t mouseButton, int x, int y)
|
||||
setWindowOnTop(true);
|
||||
XTestFakeMotionEvent(QX11Info::display(), 0, x, y, CurrentTime);
|
||||
XTestFakeButtonEvent(QX11Info::display(), mouseButton, true, CurrentTime);
|
||||
XFlush(QX11Info::display());
|
||||
XTestFakeButtonEvent(QX11Info::display(), mouseButton, false, CurrentTime);
|
||||
XFlush(QX11Info::display());
|
||||
// XTestFakeMotionEvent(QX11Info::display(), 0, x, y, CurrentTime);
|
||||
|
Loading…
x
Reference in New Issue
Block a user