fix: process damage notify event
This commit is contained in:
@@ -132,12 +132,8 @@ bool FdoSelectionManager::nativeEventFilter(const QByteArray &eventType, void *m
|
|||||||
undock(destroyedWId);
|
undock(destroyedWId);
|
||||||
}
|
}
|
||||||
} else if (responseType == m_damageEventBase + XCB_DAMAGE_NOTIFY) {
|
} else if (responseType == m_damageEventBase + XCB_DAMAGE_NOTIFY) {
|
||||||
// const auto damagedWId = reinterpret_cast<xcb_damage_notify_event_t *>(ev)->drawable;
|
const auto damagedWId = reinterpret_cast<xcb_damage_notify_event_t *>(ev)->drawable;
|
||||||
// const auto tmProxy = m_proxies.value(damagedWId);
|
m_trayManager->notifyIconChanged(damagedWId);
|
||||||
// if (tmProxy) {
|
|
||||||
// tmProxy->update();
|
|
||||||
// xcb_damage_subtract(m_x11Interface->connection(), m_damageWatches[damagedWId], XCB_NONE, XCB_NONE);
|
|
||||||
// }
|
|
||||||
} else if (responseType == XCB_CONFIGURE_REQUEST) {
|
} else if (responseType == XCB_CONFIGURE_REQUEST) {
|
||||||
// const auto event = reinterpret_cast<xcb_configure_request_event_t *>(ev);
|
// const auto event = reinterpret_cast<xcb_configure_request_event_t *>(ev);
|
||||||
// const auto tmProxy = m_proxies.value(event->window);
|
// const auto tmProxy = m_proxies.value(event->window);
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ void TrayManager1::notifyIconChanged(xcb_window_t win)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_icons[win]) {
|
||||||
|
qCDebug(SNIPROXY) << "EnableNotification is false, not sending changed signal for:" << win;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
qCDebug(SNIPROXY) << "Icon changed:" << win;
|
qCDebug(SNIPROXY) << "Icon changed:" << win;
|
||||||
Q_EMIT Changed(static_cast<uint32_t>(win));
|
Q_EMIT Changed(static_cast<uint32_t>(win));
|
||||||
}
|
}
|
||||||
@@ -88,6 +93,11 @@ QString TrayManager1::GetName(uint32_t win)
|
|||||||
|
|
||||||
void TrayManager1::EnableNotification(uint32_t win, bool enabled)
|
void TrayManager1::EnableNotification(uint32_t win, bool enabled)
|
||||||
{
|
{
|
||||||
// TODO: Implement
|
if (!m_icons.contains(win)) {
|
||||||
qCDebug(SNIPROXY) << "TODO: EnableNotification for" << win << "=" << enabled;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_icons[win] = enabled;
|
||||||
|
|
||||||
|
qCDebug(SNIPROXY) << "EnableNotification for" << win << "=" << enabled;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,5 +76,5 @@ Q_SIGNALS:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
TrayManager1Adaptor * m_adaptor;
|
TrayManager1Adaptor * m_adaptor;
|
||||||
QHash<xcb_window_t, bool> m_icons;
|
QHash<xcb_window_t, bool> m_icons; // <winid, enableNotify>
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user