Do not clear UserActionMenu's Client after the menu closed
The Client is still needed as the invoked action might be delayed by one event cycle to work around a crash if the operation causes the deco to close. BUG: 312004 FIXED-IN: 4.10 RC 2 REVIEW: 107823
This commit is contained in:
parent
dc5da9b081
commit
ebf1bc47a9
1 changed files with 3 additions and 4 deletions
|
@ -127,7 +127,7 @@ bool UserActionsMenu::isShown() const
|
|||
|
||||
bool UserActionsMenu::hasClient() const
|
||||
{
|
||||
return !m_client.isNull();
|
||||
return !m_client.isNull() && isShown();
|
||||
}
|
||||
|
||||
void UserActionsMenu::close()
|
||||
|
@ -136,7 +136,7 @@ void UserActionsMenu::close()
|
|||
return;
|
||||
}
|
||||
m_menu->close();
|
||||
m_client.clear();;
|
||||
m_client.clear();
|
||||
}
|
||||
|
||||
bool UserActionsMenu::isMenuClient(const Client *c) const
|
||||
|
@ -153,7 +153,7 @@ void UserActionsMenu::show(const QRect &pos, const QWeakPointer<Client> &cl)
|
|||
return;
|
||||
if (cl.isNull())
|
||||
return;
|
||||
if (!m_client.isNull()) // recursion
|
||||
if (isShown()) // recursion
|
||||
return;
|
||||
if (cl.data()->isDesktop()
|
||||
|| cl.data()->isDock())
|
||||
|
@ -175,7 +175,6 @@ void UserActionsMenu::show(const QRect &pos, const QWeakPointer<Client> &cl)
|
|||
else
|
||||
m_menu->exec(QPoint(x, pos.top() - popupHeight));
|
||||
}
|
||||
m_client.clear();;
|
||||
}
|
||||
|
||||
void UserActionsMenu::helperDialog(const QString& message, const QWeakPointer<Client> &c)
|
||||
|
|
Loading…
Reference in a new issue