Skip to content

Commit

Permalink
Do not set GDK_BACKEND to x11 in terminals.
Browse files Browse the repository at this point in the history
Don't automatically inherit env variables and manually pass modified env

Fixes #1871
  • Loading branch information
Davidy22 committed Oct 1, 2021
1 parent 002ba9f commit 856f5b9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 7 additions & 2 deletions guake/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ def __init__(self, guake):

self.setup_drag_and_drop()

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}")

def setup_drag_and_drop(self):
self.targets = Gtk.TargetList()
self.targets.add_uri_targets(DropTargets.URIS)
Expand Down Expand Up @@ -550,12 +554,13 @@ def spawn_sync_pid(self, directory):
Vte.PtyFlags.DEFAULT,
directory,
argv,
[f"GUAKE_TAB_UUID={self.uuid}"],
GLib.SpawnFlags.DO_NOT_REAP_CHILD,
self.envv,
GLib.SpawnFlags(Vte.SPAWN_NO_PARENT_ENVV | GLib.SpawnFlags.DO_NOT_REAP_CHILD),
None,
None,
None,
)

try:
tuple_type = gi._gi.ResultTuple # pylint: disable=c-extension-no-member
except: # pylint: disable=bare-except
Expand Down
6 changes: 6 additions & 0 deletions releasenotes/notes/fix_gdk_backend-be5c40f221c1e528.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
release_summary: >
Stopped setting GDK_BACKEND to x11 in terminals.
fixes:
- |
- GDK_BACKEND is propagated to the shell in terminal #1871

0 comments on commit 856f5b9

Please sign in to comment.