mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
xwayland: don't ping if client not supports
Signed-off-by: xurui <xurui@kylinos.cn>
This commit is contained in:
parent
31b78a4f3a
commit
18c707d90a
1 changed files with 16 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue