[PATCH 1/4] Made the window save the coordinates when being draged.

Kristian Høgsberg krh at bitplanet.net
Tue Nov 30 11:04:07 PST 2010


On Tue, Nov 30, 2010 at 1:22 PM, Joel Teichroeb <joel at teichroeb.net> wrote:

Thanks, committed.

Kristian

> ---
>  clients/window.c |   18 ++++++++++--------
>  1 files changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/clients/window.c b/clients/window.c
> index 3860d1e..f720bf8 100644
> --- a/clients/window.c
> +++ b/clients/window.c
> @@ -1018,14 +1018,16 @@ handle_configure(void *data, struct wl_shell *shell,
>        window->pending_allocation.width = width;
>        window->pending_allocation.height = height;
>
> -       if (!(edges & 15))
> -               return;
> -
> -       if (window->resize_handler)
> -               (*window->resize_handler)(window,
> -                                         window->user_data);
> -       else if (window->redraw_handler)
> -               window_schedule_redraw(window);
> +       if (edges & WINDOW_TITLEBAR) {
> +               window->allocation.x = window->pending_allocation.x;
> +               window->allocation.y = window->pending_allocation.y;
> +       } else if (edges & WINDOW_RESIZING_MASK) {
> +               if (window->resize_handler)
> +                       (*window->resize_handler)(window,
> +                                                 window->user_data);
> +               else if (window->redraw_handler)
> +                       window_schedule_redraw(window);
> +       }
>  }
>
>  static const struct wl_shell_listener shell_listener = {
> --
> 1.7.3.2
>
> _______________________________________________
> 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