Compare commits

...

2 commits

Author SHA1 Message Date
Xu Rui
93b49f26e2 Merge branch 'xwayland' into 'master'
xwayland: don't ping if client not supports

See merge request wlroots/wlroots!5103
2025-10-06 11:26:52 +00:00
xurui
18c707d90a xwayland: don't ping if client not supports
Signed-off-by: xurui <xurui@kylinos.cn>
2025-07-04 17:15:27 +08:00

View file

@ -2745,6 +2745,22 @@ bool xwm_atoms_contains(struct wlr_xwm *xwm, xcb_atom_t *atoms,
}
void wlr_xwayland_surface_ping(struct wlr_xwayland_surface *surface) {
if (surface->pinging) {
return;
}
// don't ping if client not supports
bool supports_ping = false;
for(size_t i = 0; i < surface->protocols_len; i++) {
if (surface->protocols[i] == surface->xwm->atoms[NET_WM_PING]) {
supports_ping = true;
break;
}
}
if (!supports_ping) {
return;
}
xcb_client_message_data_t data = { 0 };
data.data32[0] = surface->xwm->atoms[NET_WM_PING];
data.data32[1] = XCB_CURRENT_TIME;