[PATCH weston] xwm: do not crash when activating a NULL surface

Giulio Camuffo giuliocamuffo at gmail.com
Tue Aug 13 02:15:21 PDT 2013


2013/8/13 Kristian Høgsberg <hoegsberg at gmail.com>

> On Sat, Aug 10, 2013 at 05:23:33PM +0200, Giulio Camuffo wrote:
> > ---
> >  src/xwayland/window-manager.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/xwayland/window-manager.c
> b/src/xwayland/window-manager.c
> > index d565888..b710560 100644
> > --- a/src/xwayland/window-manager.c
> > +++ b/src/xwayland/window-manager.c
> > @@ -610,11 +610,15 @@ static void
> >  weston_wm_window_activate(struct wl_listener *listener, void *data)
> >  {
> >       struct weston_surface *surface = data;
> > -     struct weston_wm_window *window = get_wm_window(surface);
> > +     struct weston_wm_window *window = NULL;
> >       struct weston_wm *wm =
> >               container_of(listener, struct weston_wm,
> activate_listener);
> >       xcb_client_message_event_t client_message;
> >
> > +     if (data) {
> > +             window = get_wm_window(surface);
> > +     }
>
> When would this trigger?

When deactivating all the surfaces, i.e. calling weston_surface_activate(0,
seat),
with xwayland enabled.


> And testing surface instead of data would
> look a little nicer here.
>
Ok.

>
> Kristian
>
>
> >       if (window) {
> >               client_message.response_type = XCB_CLIENT_MESSAGE;
> >               client_message.format = 32;
> > --
> > 1.8.3.4
> >
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130813/c27607c0/attachment.html>


More information about the wayland-devel mailing list