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 <isaac.hermida@digi.com>
This commit is contained in:
Isaac Hermida 2023-02-01 17:54:43 +01:00
parent 007833fb2e
commit b2b76fd823
3 changed files with 2 additions and 64 deletions

View File

@ -1,61 +0,0 @@
From: Gabriel Valcazar <gabriel.valcazar@digi.com>
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 <gabriel.valcazar@digi.com>
---
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;

View File

@ -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/"