From 02ccc62de7fa063284b312ab16ccd809dd9d6d63 Mon Sep 17 00:00:00 2001 From: vitalyr Date: Tue, 16 Nov 2021 14:27:42 +0800 Subject: [PATCH] Add reno file --- guake/main.py | 9 +++++---- guake/terminal.py | 2 -- .../bugfix-guake_enable_wayland-5048964c25699a85.yaml | 3 +++ 3 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/bugfix-guake_enable_wayland-5048964c25699a85.yaml diff --git a/guake/main.py b/guake/main.py index 7edf0fdb2..98c6ef3b0 100644 --- a/guake/main.py +++ b/guake/main.py @@ -41,11 +41,12 @@ log = logging.getLogger(__name__) -# Force use X11 backend under wayland before any import of GDK through dependencies -# This could fix weird problems under Wayland -# But if user set GUAKE_ENABLE_WAYLAND=1, then force use Wayland backend +# Force use X11 backend under wayland before any import of GDK through dependencies. +# This could fix weird problems under Wayland. +# But if user set the environment variable GUAKE_ENABLE_WAYLAND, then force +# use Wayland backend. os.environ["GDK_BACKEND"] = "x11" -if os.environ["GUAKE_ENABLE_WAYLAND"] == 1: +if "GUAKE_ENABLE_WAYLAND" in os.environ: os.environ["GDK_BACKEND"] = "wayland" from guake.globals import NAME diff --git a/guake/terminal.py b/guake/terminal.py index 66e8a3bf7..2a6b559b7 100644 --- a/guake/terminal.py +++ b/guake/terminal.py @@ -121,8 +121,6 @@ def __init__(self, guake): self.setup_drag_and_drop() - # GDK_BACKEND is ingnored - # Set GUAKE_ENABLE_WAYLAND=1 to use Wayland backend self.ENVV_EXCLUDE_LIST = ["GDK_BACKEND"] self.envv = [f"{i}={os.environ[i]}" for i in os.environ if i not in self.ENVV_EXCLUDE_LIST] self.envv.append(f"GUAKE_TAB_UUID={self.uuid}") diff --git a/releasenotes/notes/bugfix-guake_enable_wayland-5048964c25699a85.yaml b/releasenotes/notes/bugfix-guake_enable_wayland-5048964c25699a85.yaml new file mode 100644 index 000000000..46ff046b0 --- /dev/null +++ b/releasenotes/notes/bugfix-guake_enable_wayland-5048964c25699a85.yaml @@ -0,0 +1,3 @@ +fixes: + - | + - Add environment variable GUAKE_ENABLE_WAYLAND, fixed #1934