chase wlroots!3391
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3991
This commit is contained in:
parent
7ae5039b4f
commit
e7f736ccc9
13
client.h
13
client.h
@ -76,24 +76,22 @@ toplevel_from_wlr_surface(struct wlr_surface *s, Client **pc, LayerSurface **pl)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (wlr_surface_is_layer_surface(root_surface)
|
if ((layer_surface = wlr_layer_surface_v1_try_from_wlr_surface(root_surface))) {
|
||||||
&& (layer_surface = wlr_layer_surface_v1_from_wlr_surface(root_surface))) {
|
|
||||||
l = layer_surface->data;
|
l = layer_surface->data;
|
||||||
type = LayerShell;
|
type = LayerShell;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wlr_surface_is_xdg_surface(root_surface)
|
if ((xdg_surface = wlr_xdg_surface_try_from_wlr_surface(root_surface))) {
|
||||||
&& (xdg_surface = wlr_xdg_surface_from_wlr_surface(root_surface))) {
|
|
||||||
while (1) {
|
while (1) {
|
||||||
switch (xdg_surface->role) {
|
switch (xdg_surface->role) {
|
||||||
case WLR_XDG_SURFACE_ROLE_POPUP:
|
case WLR_XDG_SURFACE_ROLE_POPUP:
|
||||||
if (!xdg_surface->popup->parent)
|
if (!xdg_surface->popup->parent)
|
||||||
return -1;
|
return -1;
|
||||||
else if (!wlr_surface_is_xdg_surface(xdg_surface->popup->parent))
|
else if (!wlr_xdg_surface_try_from_wlr_surface(xdg_surface->popup->parent))
|
||||||
return toplevel_from_wlr_surface(xdg_surface->popup->parent, pc, pl);
|
return toplevel_from_wlr_surface(xdg_surface->popup->parent, pc, pl);
|
||||||
|
|
||||||
xdg_surface = wlr_xdg_surface_from_wlr_surface(xdg_surface->popup->parent);
|
xdg_surface = wlr_xdg_surface_try_from_wlr_surface(xdg_surface->popup->parent);
|
||||||
break;
|
break;
|
||||||
case WLR_XDG_SURFACE_ROLE_TOPLEVEL:
|
case WLR_XDG_SURFACE_ROLE_TOPLEVEL:
|
||||||
c = xdg_surface->data;
|
c = xdg_surface->data;
|
||||||
@ -125,8 +123,7 @@ client_activate_surface(struct wlr_surface *s, int activated)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (wlr_surface_is_xdg_surface(s)
|
if ((surface = wlr_xdg_surface_try_from_wlr_surface(s))
|
||||||
&& (surface = wlr_xdg_surface_from_wlr_surface(s))
|
|
||||||
&& surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL)
|
&& surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL)
|
||||||
wlr_xdg_toplevel_set_activated(surface->toplevel, activated);
|
wlr_xdg_toplevel_set_activated(surface->toplevel, activated);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user