From 5fd7bd386045d577e082926753c850f4c28bb91a Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Fri, 29 Dec 2023 12:37:09 -0600 Subject: [PATCH] Copy over GTK 3 settings by default (LP: #2047705). --- debian/changelog | 6 ++++ debian/patches/gtk-3-configuration-copy.patch | 34 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 41 insertions(+) create mode 100644 debian/patches/gtk-3-configuration-copy.patch diff --git a/debian/changelog b/debian/changelog index 6887fd0..a9d2eee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +lxqt-session (1.4.0-0ubuntu3) noble; urgency=medium + + * Copy over GTK 3 settings by default (LP: #2047705). + + -- Simon Quigley Fri, 29 Dec 2023 12:36:24 -0600 + lxqt-session (1.4.0-0ubuntu2) noble; urgency=medium * Add an upstream patch polishing the autostart UX. diff --git a/debian/patches/gtk-3-configuration-copy.patch b/debian/patches/gtk-3-configuration-copy.patch new file mode 100644 index 0000000..38dbff3 --- /dev/null +++ b/debian/patches/gtk-3-configuration-copy.patch @@ -0,0 +1,34 @@ +Description: Copy over GTK 3 settings from XDG_CONFIG_DIRS + This is a workaround for GTK 3 settings not being applied by default from XDG. + Ideally, all desktop environments would do this, and it would be fixed in GTK itself. +Author: Simon Quigley +Origin: vendor +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/2047705 +Forwarded: no +Last-Update: 2023-12-29 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/startlxqt.in ++++ b/startlxqt.in +@@ -32,6 +32,21 @@ else + fi + done + fi ++# Handle GTK 3 configuration files ++echo "$XDG_CONFIG_DIRS" | tr ':' '\n' | while read -r dir; do ++ dir_path="$dir/gtk-3.0/" ++ if [ -d "$dir_path" ]; then ++ mkdir -p "$HOME/.config/gtk-3.0" ++ for file in "$dir_path"*; do ++ if [ -f "$file" ]; then ++ target_file="$HOME/.config/gtk-3.0/$(basename "$file")" ++ if [ ! -f "$target_file" ]; then ++ cp "$file" "$target_file" ++ fi ++ fi ++ done ++ fi ++done + + if [ -z "$XDG_CACHE_HOME" ]; then + export XDG_CACHE_HOME="$HOME/.cache" diff --git a/debian/patches/series b/debian/patches/series index ff714cf..73650ff 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ ensure-necessary-paths-are-pulled-from.patch autostart-ux-polish.patch +gtk-3-configuration-copy.patch