[PATCH 2/2] Fix XWayland crashes when opening popups

Jasper St. Pierre jstpierre at mecheye.net
Fri Jan 17 12:26:29 PST 2014


If we respect the ICCCM, we need to map the child window when the client
asks for it to be mapped. If the WM_TRANSIENT_FOR hint specifies an invalid
window, we just ignore it.

Looking through the mutter code, it seems that if we don't recognize a
window specified in WM_TRANSIENT_FOR, we warn and ignore the hint. When new
windows get mapped, we don't recheck the existing WM_TRANSIENT_FOR hints.

So, this seems correct to me.


On Fri, Jan 17, 2014 at 3:01 PM, Kristian Høgsberg <hoegsberg at gmail.com>wrote:

> On Sun, Jan 12, 2014 at 03:06:05PM +0100, Axel Davy wrote:
> > Signed-off-by: Axel Davy <axel.davy at ens.fr>
> > ---
> >  xwayland/window-manager.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> I don't think we have the right fix here, but I've applied the patch
> since we're too close to release right now.  If a window is
> transient_for another window and we don't have a surface for the
> parent, I think we should wait for the parent to be mapped before we
> map the child window.
>
> Kristian
>
> > diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
> > index d475e36..1bb9825 100644
> > --- a/xwayland/window-manager.c
> > +++ b/xwayland/window-manager.c
> > @@ -2214,7 +2214,7 @@ xserver_map_shell_surface(struct weston_wm *wm,
> >                                             window->x,
> >                                             window->y,
> >
> WL_SHELL_SURFACE_TRANSIENT_INACTIVE);
> > -     } else if (window->transient_for) {
> > +     } else if (window->transient_for &&
> window->transient_for->surface) {
> >               parent = window->transient_for;
> >               shell_interface->set_transient(window->shsurf,
> >                                              parent->surface,
> > --
> > 1.8.3.2
> >
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>



-- 
  Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140117/bfb7e195/attachment.html>


More information about the wayland-devel mailing list