[PATCH weston] clients/clickdot: Toggle maximized state with 'm'
Bryce Harrington
bryce at osg.samsung.com
Thu Sep 17 16:35:58 PDT 2015
On Fri, Jun 26, 2015 at 12:37:55PM +0800, Jonas Ådahl wrote:
> In order to test warping when pointer confinement region changes, add
> key binding to the maximized state without using the mouse.
>
> Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
> ---
>
> This patch is an addition to the pointer lock series. Its purpose is to
> demonstrate the changing of the lock/confine regions without breaking
> the active or pending lock.
>
>
> clients/clickdot.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
I presume this patch depends on some other patches to land first, since
pointer_confined isn't yet in the clickdot structure. But apart from
that detail, this LGTM for landing post-release:
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
> diff --git a/clients/clickdot.c b/clients/clickdot.c
> index bf5169e..b77c690 100644
> --- a/clients/clickdot.c
> +++ b/clients/clickdot.c
> @@ -309,6 +309,9 @@ key_handler(struct window *window, struct input *input, uint32_t time,
> clickdot->buffer = NULL;
> window_schedule_redraw(clickdot->window);
> break;
> + case XKB_KEY_m:
> + window_set_maximized(clickdot->window,
> + !window_is_maximized(window));
> }
> }
>
> @@ -388,6 +391,14 @@ resize_handler(struct widget *widget,
>
> clickdot->reset = 1;
> clickdot->complex_confine_region_dirty = true;
> +
> + if (clickdot->pointer_confined) {
> + calculate_complex_confine_region(clickdot);
> + window_update_confine_rectangles(
> + clickdot->window,
> + clickdot->complex_confine_region,
> + NUM_COMPLEX_REGION_RECTS);
> + }
> }
>
> static void
> --
> 2.1.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