Changeset View
Changeset View
Standalone View
Standalone View
applets/taskmanager/plugin/backend.cpp
Show First 20 Lines • Show All 82 Lines • ▼ Show 20 Line(s) | 82 | if (item != m_toolTipItem) { | |||
---|---|---|---|---|---|
83 | m_toolTipItem = item; | 83 | m_toolTipItem = item; | ||
84 | 84 | | |||
85 | connect(item, SIGNAL(windowChanged(QQuickWindow*)), this, SLOT(toolTipWindowChanged(QQuickWindow*))); | 85 | connect(item, SIGNAL(windowChanged(QQuickWindow*)), this, SLOT(toolTipWindowChanged(QQuickWindow*))); | ||
86 | 86 | | |||
87 | emit toolTipItemChanged(); | 87 | emit toolTipItemChanged(); | ||
88 | } | 88 | } | ||
89 | } | 89 | } | ||
90 | 90 | | |||
91 | QQuickWindow *Backend::groupDialog() const | ||||
92 | { | ||||
93 | return m_groupDialog; | ||||
94 | } | ||||
95 | | ||||
96 | void Backend::setGroupDialog(QQuickWindow *dialog) | ||||
97 | { | ||||
98 | if (dialog != m_groupDialog) { | ||||
99 | m_groupDialog = dialog; | ||||
100 | | ||||
101 | emit groupDialogChanged(); | ||||
102 | } | ||||
103 | } | ||||
104 | | ||||
91 | bool Backend::highlightWindows() const | 105 | bool Backend::highlightWindows() const | ||
92 | { | 106 | { | ||
93 | return m_highlightWindows; | 107 | return m_highlightWindows; | ||
94 | } | 108 | } | ||
95 | 109 | | |||
96 | void Backend::setHighlightWindows(bool highlight) | 110 | void Backend::setHighlightWindows(bool highlight) | ||
97 | { | 111 | { | ||
98 | if (highlight != m_highlightWindows) { | 112 | if (highlight != m_highlightWindows) { | ||
▲ Show 20 Lines • Show All 220 Lines • ▼ Show 20 Line(s) | |||||
319 | 333 | | |||
320 | bool Backend::canPresentWindows() const | 334 | bool Backend::canPresentWindows() const | ||
321 | { | 335 | { | ||
322 | return (KWindowSystem::compositingActive() && KWindowEffects::isEffectAvailable(KWindowEffects::PresentWindowsGroup)); | 336 | return (KWindowSystem::compositingActive() && KWindowEffects::isEffectAvailable(KWindowEffects::PresentWindowsGroup)); | ||
323 | } | 337 | } | ||
324 | 338 | | |||
325 | void Backend::presentWindows(const QVariant &_winIds) | 339 | void Backend::presentWindows(const QVariant &_winIds) | ||
326 | { | 340 | { | ||
341 | if (!m_taskManagerItem || !m_taskManagerItem->window()) { | ||||
342 | return; | ||||
343 | } | ||||
344 | | ||||
327 | QList<WId> winIds; | 345 | QList<WId> winIds; | ||
328 | 346 | | |||
329 | const QVariantList &_winIdsList = _winIds.toList(); | 347 | const QVariantList &_winIdsList = _winIds.toList(); | ||
330 | 348 | | |||
331 | foreach(const QVariant &_winId, _winIdsList) { | 349 | foreach(const QVariant &_winId, _winIdsList) { | ||
332 | bool ok = false; | 350 | bool ok = false; | ||
333 | qlonglong winId = _winId.toLongLong(&ok); | 351 | qlonglong winId = _winId.toLongLong(&ok); | ||
334 | 352 | | |||
▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Line(s) | 425 | { | |||
422 | } | 440 | } | ||
423 | 441 | | |||
424 | QList<WId> windows = m_windowsToHighlight; | 442 | QList<WId> windows = m_windowsToHighlight; | ||
425 | 443 | | |||
426 | if (windows.count() && m_toolTipItem && m_toolTipItem->window()) { | 444 | if (windows.count() && m_toolTipItem && m_toolTipItem->window()) { | ||
427 | windows.append(m_toolTipItem->window()->winId()); | 445 | windows.append(m_toolTipItem->window()->winId()); | ||
428 | } | 446 | } | ||
429 | 447 | | |||
448 | if (windows.count() && m_groupDialog) { | ||||
449 | windows.append(m_groupDialog->winId()); | ||||
450 | } | ||||
451 | | ||||
430 | KWindowEffects::highlightWindows(m_panelWinId, windows); | 452 | KWindowEffects::highlightWindows(m_panelWinId, windows); | ||
431 | } | 453 | } |