[PATCH] display_iterate: Process only enabled event masks

Kristian Høgsberg krh at bitplanet.net
Sun Jan 23 10:35:51 PST 2011


On Sat, Jan 22, 2011 at 2:41 PM, Benjamin Franzke
<benjaminfranzke at googlemail.com> wrote:
> ---
>  wayland/wayland-client.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)

Thanks, applied.  I added a warning if we hit this case, as it's not
something the user should do.

Kristian

> diff --git a/wayland/wayland-client.c b/wayland/wayland-client.c
> index 0259017..08dbc50 100644
> --- a/wayland/wayland-client.c
> +++ b/wayland/wayland-client.c
> @@ -494,6 +494,10 @@ wl_display_iterate(struct wl_display *display, uint32_t mask)
>        uint32_t p[2], object, opcode, size;
>        int len;
>
> +       mask &= display->mask;
> +       if (mask == 0)
> +               return;
> +
>        len = wl_connection_data(display->connection, mask);
>        while (len > 0) {
>                if (len < sizeof p)
> --
> 1.7.3.4
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>


More information about the wayland-devel mailing list