mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-05 04:06:11 -05:00
Merge branch 'xwayland' into 'master'
xwayland: don't ping if client not supports See merge request wlroots/wlroots!5103
This commit is contained in:
commit
dccfed0e3e
1 changed files with 16 additions and 0 deletions
|
|
@ -2770,6 +2770,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