xwayland: abstract override-redirect behind function

This commit is contained in:
Jente Hidskes 2019-01-31 18:29:03 +01:00
parent 16ab37b706
commit c47eb031c6
No known key found for this signature in database
GPG key ID: 04BE5A29F32D91EA
3 changed files with 10 additions and 2 deletions

3
view.c
View file

@ -107,8 +107,7 @@ view_map(struct cg_view *view, struct wlr_surface *surface)
#if CAGE_HAS_XWAYLAND
/* We shouldn't position override-redirect windows. They set
their own (x,y) coordinates in handle_wayland_surface_new. */
if (view->type != CAGE_XWAYLAND_VIEW ||
!xwayland_view_from_view(view)->xwayland_surface->override_redirect)
if (view->type != CAGE_XWAYLAND_VIEW || xwayland_view_should_manage(view))
#endif
{
view_position(view);