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