diff options
author | 2023-06-28 22:39:37 +0200 | |
---|---|---|
committer | 2024-04-26 16:15:24 +0200 | |
commit | 79d331e29dc7b923714cd79a68719b39abe1e815 (patch) | |
tree | e07ada5490b86b54f79cabc8b7aaeebc9a87bdcb /meta-agl-core/recipes-graphics/wayland/weston/0001-simple-touch-Add-maximized-fullscreen-states.patch | |
parent | 74db94aba754bd36ab546f85a5a4a80b91ce79e4 (diff) |
meta-agl-core: updates for Weston 12.0
Rename local bbappend and remove backported and unused patches.
Bug-AGL: SPEC-4850
Change-Id: Ibc61b7905611eb2a124c7339e8a4d0b3981d276c
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
[patches updated]
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'meta-agl-core/recipes-graphics/wayland/weston/0001-simple-touch-Add-maximized-fullscreen-states.patch')
-rw-r--r-- | meta-agl-core/recipes-graphics/wayland/weston/0001-simple-touch-Add-maximized-fullscreen-states.patch | 138 |
1 files changed, 0 insertions, 138 deletions
diff --git a/meta-agl-core/recipes-graphics/wayland/weston/0001-simple-touch-Add-maximized-fullscreen-states.patch b/meta-agl-core/recipes-graphics/wayland/weston/0001-simple-touch-Add-maximized-fullscreen-states.patch deleted file mode 100644 index 53a620ef7..000000000 --- a/meta-agl-core/recipes-graphics/wayland/weston/0001-simple-touch-Add-maximized-fullscreen-states.patch +++ /dev/null @@ -1,138 +0,0 @@ -From 666300564093838c7d6a723fbce7e3b1a719e873 Mon Sep 17 00:00:00 2001 -From: Marius Vlad <marius.vlad@collabora.com> -Date: Thu, 22 Dec 2022 18:27:14 +0200 -Subject: [PATCH 1/3] simple-touch: Add maximized/fullscreen states - -Helpful to have other states like maximized or fullscreen for -the simple-touch client. - -Upstream-Status: Pending - -Signed-off-by: Marius Vlad <marius.vlad@collabora.com> ---- - clients/simple-touch.c | 55 ++++++++++++++++++++++++++++++++++++------ - 1 file changed, 48 insertions(+), 7 deletions(-) - -diff --git a/clients/simple-touch.c b/clients/simple-touch.c -index 6559aa24d..e32013161 100644 ---- a/clients/simple-touch.c -+++ b/clients/simple-touch.c -@@ -64,9 +64,13 @@ struct touch { - struct xdg_toplevel *xdg_toplevel; - struct buffer *buffer; - int width, height; -+ int init_width, init_height; - bool running; - bool wait_for_configure; -+ bool needs_buffer_update; - bool has_argb; -+ bool maximized; -+ bool fullscreen; - }; - - static struct buffer * -@@ -111,7 +115,7 @@ create_shm_buffer(struct touch *touch) - } - - static void --initial_redraw(void *data) -+redraw(void *data) - { - struct touch *touch = data; - struct buffer *buffer = NULL; -@@ -119,6 +123,9 @@ initial_redraw(void *data) - buffer = create_shm_buffer(touch); - assert(buffer); - -+ if (touch->buffer) -+ free(touch->buffer); -+ - touch->buffer = buffer; - - /* paint the "work-area" */ -@@ -283,9 +290,10 @@ handle_xdg_surface_configure(void *data, struct xdg_surface *surface, - - xdg_surface_ack_configure(surface, serial); - -- if (touch->wait_for_configure) { -- initial_redraw(touch); -+ if (touch->wait_for_configure || touch->needs_buffer_update) { -+ redraw(touch); - touch->wait_for_configure = false; -+ touch->needs_buffer_update = false; - } - } - -@@ -340,9 +348,40 @@ static const struct wl_registry_listener registry_listener = { - - static void - handle_toplevel_configure(void *data, struct xdg_toplevel *xdg_toplevel, -- int32_t width, int32_t height, -- struct wl_array *state) -+ int32_t width, int32_t height, struct wl_array *states) - { -+ struct touch *touch = data; -+ uint32_t *p; -+ -+ touch->fullscreen = false; -+ touch->maximized = false; -+ -+ wl_array_for_each(p, states) { -+ uint32_t state = *p; -+ switch (state) { -+ case XDG_TOPLEVEL_STATE_FULLSCREEN: -+ touch->fullscreen = true; -+ break; -+ case XDG_TOPLEVEL_STATE_MAXIMIZED: -+ touch->maximized = true; -+ break; -+ } -+ } -+ -+ if (width > 0 && height > 0) { -+ if (!touch->fullscreen && !touch->maximized) { -+ touch->init_width = width; -+ touch->init_width = height; -+ } -+ touch->width = width; -+ touch->height = height; -+ } else if (!touch->fullscreen && !touch->maximized) { -+ touch->width = touch->init_width; -+ touch->height = touch->init_height; -+ -+ } -+ -+ touch->needs_buffer_update = true; - } - - static void -@@ -371,6 +410,7 @@ touch_create(int width, int height) - assert(touch->display); - - touch->has_argb = false; -+ touch->buffer = NULL; - touch->registry = wl_display_get_registry(touch->display); - wl_registry_add_listener(touch->registry, ®istry_listener, touch); - wl_display_dispatch(touch->display); -@@ -386,8 +426,8 @@ touch_create(int width, int height) - exit(1); - } - -- touch->width = width; -- touch->height = height; -+ touch->init_width = width; -+ touch->init_height = height; - touch->surface = wl_compositor_create_surface(touch->compositor); - - touch->xdg_surface = -@@ -403,6 +443,7 @@ touch_create(int width, int height) - xdg_toplevel_set_title(touch->xdg_toplevel, "simple-touch"); - xdg_toplevel_set_app_id(touch->xdg_toplevel, "simple-touch"); - touch->wait_for_configure = true; -+ touch->needs_buffer_update = false; - wl_surface_commit(touch->surface); - - touch->running = true; --- -2.35.1 - |