[PATCH xwayland 2/3] Check for frame being NULL before setting/unsetting flags

Dima Ryazanov dima at gmail.com
Fri Nov 15 09:42:36 PST 2013


You're right, your fix does look better!


On Fri, Nov 15, 2013 at 5:07 AM, Axel Davy <davy at clipper.ens.fr> wrote:

>  I've posted a patch, which prevents wm->focus_window to be a window
> without frame.
>
> This solves the same bug than this patch, but looks better to me.
>
>
> http://lists.freedesktop.org/archives/wayland-devel/2013-November/012008.html
>
> Axel Davy
>
> Le 15/11/2013 11:25, Axel Davy a écrit :
>
> This patch (Again, I had the same), solves the last bugs for XWayland,
> but for this one, I'm not sure it is the correct fix.
>
> In fact it would mean than focus_window would be an unmapped windows,
> which looks strange to me.
>
> Axel Davy
>
> Le 15/11/2013 11:01, Dima Ryazanov a écrit :
>
> Fixes a crash in Firefox when clicking an "install plugin" popup.
>
> Signed-off-by: Dima Ryazanov <dima at gmail.com> <dima at gmail.com>
> ---
>   src/xwayland/window-manager.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
> index 5ee9480..6d29026 100644
> --- a/src/xwayland/window-manager.c
> +++ b/src/xwayland/window-manager.c
> @@ -695,12 +695,14 @@ weston_wm_window_activate(struct wl_listener
> *listener, void *data)
>       }
>         if (wm->focus_window) {
> -        frame_unset_flag(wm->focus_window->frame, FRAME_FLAG_ACTIVE);
> +        if (wm->focus_window->frame)
> +            frame_unset_flag(wm->focus_window->frame, FRAME_FLAG_ACTIVE);
>           weston_wm_window_schedule_repaint(wm->focus_window);
>       }
>       wm->focus_window = window;
>       if (wm->focus_window) {
> -        frame_set_flag(wm->focus_window->frame, FRAME_FLAG_ACTIVE);
> +        if (wm->focus_window->frame)
> +            frame_set_flag(wm->focus_window->frame, FRAME_FLAG_ACTIVE);
>           weston_wm_window_schedule_repaint(wm->focus_window);
>       }
>   }
>
>
> _______________________________________________
> 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/20131115/8c33d537/attachment.html>


More information about the wayland-devel mailing list