mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-06-14 14:32:57 -04:00
Merge branch 'wm-transient-len-check' into 'master'
xwayland/xwm: check WM_TRANSIENT_FOR length See merge request wlroots/wlroots!5400
This commit is contained in:
commit
b1cdee3ef6
1 changed files with 6 additions and 2 deletions
|
|
@ -808,8 +808,12 @@ static void read_surface_parent(struct wlr_xwm *xwm,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlr_xwayland_surface *found_parent = NULL;
|
struct wlr_xwayland_surface *found_parent = NULL;
|
||||||
const xcb_window_t *xid = xcb_get_property_value(reply);
|
if (reply->type != XCB_ATOM_NONE) {
|
||||||
if (reply->type != XCB_ATOM_NONE && xid != NULL) {
|
if (xcb_get_property_value_length(reply) != sizeof(xcb_window_t)) {
|
||||||
|
wlr_log(WLR_DEBUG, "Invalid WM_TRANSIENT_FOR property length");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const xcb_window_t *xid = xcb_get_property_value(reply);
|
||||||
found_parent = lookup_surface(xwm, *xid);
|
found_parent = lookup_surface(xwm, *xid);
|
||||||
if (!has_parent(found_parent, xsurface)) {
|
if (!has_parent(found_parent, xsurface)) {
|
||||||
xsurface->parent = found_parent;
|
xsurface->parent = found_parent;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue