mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-03 00:15:21 +00:00
fix tip not shown when app is inactive
Change-Id: Ifc31d319d996251525fbb9cd19d7713b0859488f
This commit is contained in:
parent
a916bf5af9
commit
021a618e13
@ -79,6 +79,10 @@ public:
|
||||
inline QString menu() const
|
||||
{ return qvariant_cast< QString >(property("Menu")); }
|
||||
|
||||
Q_PROPERTY(QString Name READ name NOTIFY NameChanged)
|
||||
inline QString name() const
|
||||
{ return qvariant_cast< QString >(property("Name")); }
|
||||
|
||||
Q_PROPERTY(quint32 CurrentWindow READ currentWindow NOTIFY CurrentWindowChanged)
|
||||
inline quint32 currentWindow() const
|
||||
{ return qvariant_cast< quint32 >(property("CurrentWindow")); }
|
||||
@ -122,6 +126,7 @@ void IdChanged();
|
||||
void TitleChanged();
|
||||
void IconChanged();
|
||||
void MenuChanged();
|
||||
void NameChanged();
|
||||
void CurrentWindowChanged();
|
||||
};
|
||||
|
||||
|
@ -288,14 +288,17 @@ const QString AppItem::contextMenu() const
|
||||
|
||||
QWidget *AppItem::popupTips()
|
||||
{
|
||||
if (m_titles.isEmpty())
|
||||
return nullptr;
|
||||
if (m_draging)
|
||||
return nullptr;
|
||||
|
||||
const quint32 currentWindow = m_itemEntry->currentWindow();
|
||||
Q_ASSERT(m_titles.contains(currentWindow));
|
||||
m_appNameTips->setText(m_titles[currentWindow]);
|
||||
if (!m_titles.isEmpty())
|
||||
{
|
||||
const quint32 currentWindow = m_itemEntry->currentWindow();
|
||||
Q_ASSERT(m_titles.contains(currentWindow));
|
||||
m_appNameTips->setText(m_titles[currentWindow]);
|
||||
} else {
|
||||
m_appNameTips->setText(m_itemEntry->name());
|
||||
}
|
||||
|
||||
return m_appNameTips;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user