Changeset View
Changeset View
Standalone View
Standalone View
decorations/decoratedclient.cpp
Show First 20 Lines • Show All 117 Lines • ▼ Show 20 Line(s) | 49 | { | |||
---|---|---|---|---|---|
118 | connect(client, &AbstractClient::applicationMenuActiveChanged, decoratedClient, &KDecoration2::DecoratedClient::applicationMenuActiveChanged); | 118 | connect(client, &AbstractClient::applicationMenuActiveChanged, decoratedClient, &KDecoration2::DecoratedClient::applicationMenuActiveChanged); | ||
119 | 119 | | |||
120 | m_toolTipWakeUp.setSingleShot(true); | 120 | m_toolTipWakeUp.setSingleShot(true); | ||
121 | connect(&m_toolTipWakeUp, &QTimer::timeout, this, | 121 | connect(&m_toolTipWakeUp, &QTimer::timeout, this, | ||
122 | [this]() { | 122 | [this]() { | ||
123 | int fallAsleepDelay = QApplication::style()->styleHint(QStyle::SH_ToolTip_FallAsleepDelay); | 123 | int fallAsleepDelay = QApplication::style()->styleHint(QStyle::SH_ToolTip_FallAsleepDelay); | ||
124 | this->m_toolTipFallAsleep.setRemainingTime(fallAsleepDelay); | 124 | this->m_toolTipFallAsleep.setRemainingTime(fallAsleepDelay); | ||
125 | 125 | | |||
126 | QToolTip::showText(Cursor::pos(), this->m_toolTipText); | 126 | QToolTip::showText(Cursors::self()->mouse()->pos(), this->m_toolTipText); | ||
127 | m_toolTipShowing = true; | 127 | m_toolTipShowing = true; | ||
128 | } | 128 | } | ||
129 | ); | 129 | ); | ||
130 | } | 130 | } | ||
131 | 131 | | |||
132 | DecoratedClientImpl::~DecoratedClientImpl() | 132 | DecoratedClientImpl::~DecoratedClientImpl() | ||
133 | { | 133 | { | ||
134 | if (m_toolTipShowing) { | 134 | if (m_toolTipShowing) { | ||
▲ Show 20 Lines • Show All 101 Lines • ▼ Show 20 Line(s) | 235 | { | |||
236 | m_toolTipWakeUp.stop(); | 236 | m_toolTipWakeUp.stop(); | ||
237 | QToolTip::hideText(); | 237 | QToolTip::hideText(); | ||
238 | m_toolTipShowing = false; | 238 | m_toolTipShowing = false; | ||
239 | } | 239 | } | ||
240 | 240 | | |||
241 | void DecoratedClientImpl::requestShowWindowMenu() | 241 | void DecoratedClientImpl::requestShowWindowMenu() | ||
242 | { | 242 | { | ||
243 | // TODO: add rect to requestShowWindowMenu | 243 | // TODO: add rect to requestShowWindowMenu | ||
244 | Workspace::self()->showWindowMenu(QRect(Cursor::pos(), Cursor::pos()), m_client); | 244 | Workspace::self()->showWindowMenu(QRect(Cursors::self()->mouse()->pos(), Cursors::self()->mouse()->pos()), m_client); | ||
245 | } | 245 | } | ||
246 | 246 | | |||
247 | void DecoratedClientImpl::requestShowApplicationMenu(const QRect &rect, int actionId) | 247 | void DecoratedClientImpl::requestShowApplicationMenu(const QRect &rect, int actionId) | ||
248 | { | 248 | { | ||
249 | Workspace::self()->showApplicationMenu(rect, m_client, actionId); | 249 | Workspace::self()->showApplicationMenu(rect, m_client, actionId); | ||
250 | } | 250 | } | ||
251 | 251 | | |||
252 | void DecoratedClientImpl::showApplicationMenu(int actionId) | 252 | void DecoratedClientImpl::showApplicationMenu(int actionId) | ||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |