From b2b76fd8234e99614a36fefc0512e8a2827c8a51 Mon Sep 17 00:00:00 2001 From: Isaac Hermida Date: Wed, 1 Feb 2023 17:54:43 +0100 Subject: [PATCH] recipes-browser: cog: revert fullscreen patch There is an environment option "COG_PLATFORM_WL_VIEW_FULLSCREEN" for that purpose, so do not patch the code. Set that variable to true if you want "cog" to be started in fullscreen mode. https://onedigi.atlassian.net/browse/DEL-8356 Signed-off-by: Isaac Hermida --- ...tform-fdo-always-use-fullscreen-mode.patch | 61 ------------------- ...0001-wl-Fix-wrong-wl_shm-for-cursor.patch} | 0 .../webkit/recipes-browser/cog/cog_%.bbappend | 5 +- 3 files changed, 2 insertions(+), 64 deletions(-) delete mode 100644 meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0001-cog-platform-fdo-always-use-fullscreen-mode.patch rename meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/{0002-wl-Fix-wrong-wl_shm-for-cursor.patch => 0001-wl-Fix-wrong-wl_shm-for-cursor.patch} (100%) diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0001-cog-platform-fdo-always-use-fullscreen-mode.patch b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0001-cog-platform-fdo-always-use-fullscreen-mode.patch deleted file mode 100644 index cb78c404c..000000000 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0001-cog-platform-fdo-always-use-fullscreen-mode.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: Gabriel Valcazar -Date: Wed, 23 Jun 2021 10:17:59 +0200 -Subject: [PATCH] cog-platform-fdo: always use fullscreen mode - -Otherwise, the browser will spawn on a random place on the desktop every time. - -Signed-off-by: Gabriel Valcazar ---- - platform/wayland/cog-platform-wl.c | 37 +++++++++--------------------- - 1 file changed, 11 insertions(+), 26 deletions(-) - -diff --git a/platform/wayland/cog-platform-wl.c b/platform/wayland/cog-platform-wl.c -index f62faad..fe6b866 100644 ---- a/platform/wayland/cog-platform-wl.c -+++ b/platform/wayland/cog-platform-wl.c -@@ -2184,34 +2184,19 @@ create_window (GError **error) - configure_surface_geometry(0, 0); - } - -- const char *env_var; -- if ((env_var = g_getenv("COG_PLATFORM_WL_VIEW_FULLSCREEN")) && g_ascii_strtoll(env_var, NULL, 10) > 0) { -- win_data.is_maximized = false; -- win_data.is_fullscreen = true; -+ win_data.is_maximized = false; -+ win_data.is_fullscreen = true; - -- if (wl_data.xdg_shell != NULL) { -- xdg_toplevel_set_fullscreen(win_data.xdg_toplevel, NULL); -- } else if (wl_data.fshell != NULL) { -- win_data.should_resize_to_largest_output = true; -- resize_to_largest_output(); -- } else if (wl_data.shell != NULL) { -- wl_shell_surface_set_fullscreen(win_data.shell_surface, WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE, 0, NULL); -- } else { -- g_warning("No available shell capable of fullscreening."); -- win_data.is_fullscreen = false; -- } -- } else if ((env_var = g_getenv("COG_PLATFORM_WL_VIEW_MAXIMIZE")) && g_ascii_strtoll(env_var, NULL, 10) > 0) { -- win_data.is_maximized = true; -+ if (wl_data.xdg_shell != NULL) { -+ xdg_toplevel_set_fullscreen(win_data.xdg_toplevel, NULL); -+ } else if (wl_data.fshell != NULL) { -+ win_data.should_resize_to_largest_output = true; -+ resize_to_largest_output(); -+ } else if (wl_data.shell != NULL) { -+ wl_shell_surface_set_fullscreen(win_data.shell_surface, WL_SHELL_SURFACE_FULLSCREEN_METHOD_SCALE, 0, NULL); -+ } else { -+ g_warning("No available shell capable of fullscreening."); - win_data.is_fullscreen = false; -- -- if (wl_data.xdg_shell != NULL) { -- xdg_toplevel_set_maximized (win_data.xdg_toplevel); -- } else if (wl_data.shell != NULL) { -- wl_shell_surface_set_maximized (win_data.shell_surface, NULL); -- } else { -- g_warning ("No available shell capable of maximizing."); -- win_data.is_maximized = false; -- } - } - - return TRUE; diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0002-wl-Fix-wrong-wl_shm-for-cursor.patch b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0001-wl-Fix-wrong-wl_shm-for-cursor.patch similarity index 100% rename from meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0002-wl-Fix-wrong-wl_shm-for-cursor.patch rename to meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog/0001-wl-Fix-wrong-wl_shm-for-cursor.patch diff --git a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_%.bbappend b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_%.bbappend index 6e253e8ed..aaf4a8df2 100644 --- a/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_%.bbappend +++ b/meta-digi-dey/dynamic-layers/webkit/recipes-browser/cog/cog_%.bbappend @@ -1,10 +1,9 @@ -# Copyright 2020-2022 Digi International Inc. +# Copyright 2020-2023 Digi International Inc. FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" SRC_URI:append = " \ - file://0001-cog-platform-fdo-always-use-fullscreen-mode.patch \ - file://0002-wl-Fix-wrong-wl_shm-for-cursor.patch \ + file://0001-wl-Fix-wrong-wl_shm-for-cursor.patch \ " EXTRA_OECMAKE += "-DCOG_HOME_URI=http://127.0.0.1/"