!9 Update to 43.0

From: @dwl301 
Reviewed-by: @zhang__3125 
Signed-off-by: @zhang__3125
This commit is contained in:
openeuler-ci-bot 2023-02-03 08:46:54 +00:00 committed by Gitee
commit dade92a9bb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 181 additions and 16 deletions

155
309.patch Normal file
View File

@ -0,0 +1,155 @@
From 27bc0889c87a49100bf4b1c0ecf01be1629ff9c6 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Tue, 20 Sep 2022 18:08:44 +0200
Subject: [PATCH] xsettings: Always fallback to ibus
Traditionally, we've used ibus strictly when necessary (i.e. there
was an IM configured that required IBus to be enabled). A bit more
recently, we added OSK checks so that environments with an OSK
would also have IBus enabled so that GNOME Shell could track focus
positions without pulling a11y.
Nowadays, we simply want ibus always enabled, even if the underlying
keymap wouldn't seemingly use its features. We anyways want it for
the handling of emojis and dead keys.
Always enable IBus for X11 clients, unless there is another IM
configured in the global GSetting.
Closes: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/705
---
plugins/xsettings/gsd-xsettings-manager.c | 70 +----------------------
1 file changed, 1 insertion(+), 69 deletions(-)
diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c
index 68b6ed77..567d3bbd 100644
--- a/plugins/xsettings/gsd-xsettings-manager.c
+++ b/plugins/xsettings/gsd-xsettings-manager.c
@@ -57,8 +57,6 @@
#define WM_SETTINGS_SCHEMA "org.gnome.desktop.wm.preferences"
#define A11Y_SCHEMA "org.gnome.desktop.a11y"
#define A11Y_INTERFACE_SCHEMA "org.gnome.desktop.a11y.interface"
-#define A11Y_APPLICATIONS_SCHEMA "org.gnome.desktop.a11y.applications"
-#define INPUT_SOURCES_SCHEMA "org.gnome.desktop.input-sources"
#define CLASSIC_WM_SETTINGS_SCHEMA "org.gnome.shell.extensions.classic-overrides"
#define XSETTINGS_PLUGIN_SCHEMA "org.gnome.settings-daemon.plugins.xsettings"
@@ -77,16 +75,11 @@
#define HIGH_CONTRAST_KEY "high-contrast"
-#define INPUT_SOURCES_KEY "sources"
-#define OSK_ENABLED_KEY "screen-keyboard-enabled"
#define GTK_IM_MODULE_KEY "gtk-im-module"
#define GTK_SETTINGS_DBUS_PATH "/org/gtk/Settings"
#define GTK_SETTINGS_DBUS_NAME "org.gtk.Settings"
-#define INPUT_SOURCE_TYPE_IBUS "ibus"
-
-#define GTK_IM_MODULE_SIMPLE "gtk-im-context-simple"
#define GTK_IM_MODULE_IBUS "ibus"
static const gchar introspection_xml[] =
@@ -292,8 +285,6 @@ struct _GsdXSettingsManager
gint64 fontconfig_timestamp;
GSettings *interface_settings;
- GSettings *input_sources_settings;
- GSettings *a11y_settings;
GdkSeat *user_seat;
GsdXSettingsGtk *gtk;
@@ -1341,51 +1332,6 @@ migrate_settings (void)
mouse_entries, G_N_ELEMENTS (mouse_entries));
}
-static gboolean
-need_ibus (GsdXSettingsManager *manager)
-{
- GVariant *sources;
- GVariantIter iter;
- const gchar *type;
- gboolean needs_ibus = FALSE;
-
- sources = g_settings_get_value (manager->input_sources_settings,
- INPUT_SOURCES_KEY);
-
- g_variant_iter_init (&iter, sources);
- while (g_variant_iter_next (&iter, "(&s&s)", &type, NULL)) {
- if (g_str_equal (type, INPUT_SOURCE_TYPE_IBUS)) {
- needs_ibus = TRUE;
- break;
- }
- }
-
- g_variant_unref (sources);
-
- return needs_ibus;
-}
-
-static gboolean
-need_osk (GsdXSettingsManager *manager)
-{
- gboolean has_touchscreen = FALSE;
- GList *devices;
- GdkSeat *seat;
-
- if (g_settings_get_boolean (manager->a11y_settings,
- OSK_ENABLED_KEY))
- return TRUE;
-
- seat = gdk_display_get_default_seat (gdk_display_get_default ());
- devices = gdk_seat_get_slaves (seat, GDK_SEAT_CAPABILITY_TOUCH);
-
- has_touchscreen = devices != NULL;
-
- g_list_free (devices);
-
- return has_touchscreen;
-}
-
static void
update_gtk_im_module (GsdXSettingsManager *manager)
{
@@ -1396,10 +1342,8 @@ update_gtk_im_module (GsdXSettingsManager *manager)
GTK_IM_MODULE_KEY);
if (setting && *setting)
module = setting;
- else if (need_ibus (manager) || need_osk (manager))
- module = GTK_IM_MODULE_IBUS;
else
- module = GTK_IM_MODULE_SIMPLE;
+ module = GTK_IM_MODULE_IBUS;
xsettings_manager_set_string (manager->manager, "Gtk/IMModule", module);
g_free (setting);
@@ -1473,16 +1417,6 @@ gsd_xsettings_manager_start (GsdXSettingsManager *manager,
g_signal_connect_swapped (manager->interface_settings,
"changed::" GTK_IM_MODULE_KEY,
G_CALLBACK (update_gtk_im_module), manager);
-
- manager->input_sources_settings = g_settings_new (INPUT_SOURCES_SCHEMA);
- g_signal_connect_swapped (manager->input_sources_settings,
- "changed::" INPUT_SOURCES_KEY,
- G_CALLBACK (update_gtk_im_module), manager);
-
- manager->a11y_settings = g_settings_new (A11Y_APPLICATIONS_SCHEMA);
- g_signal_connect_swapped (manager->a11y_settings,
- "changed::" OSK_ENABLED_KEY,
- G_CALLBACK (update_gtk_im_module), manager);
update_gtk_im_module (manager);
manager->monitors_changed_id =
@@ -1689,8 +1623,6 @@ gsd_xsettings_manager_stop (GsdXSettingsManager *manager)
manager->user_seat = NULL;
}
- g_clear_object (&manager->a11y_settings);
- g_clear_object (&manager->input_sources_settings);
g_clear_object (&manager->interface_settings);
}
--
GitLab

Binary file not shown.

Binary file not shown.

View File

@ -1,8 +1,8 @@
%global glib2_version 2.56
%global glib2_version 2.58
%global colord_version 1.4.5
%global geocode_glib_version 3.10.0
%global geocode_glib_version 3.26.3
%global gnome_desktop_version 3.37.1
%global gsettings_desktop_schemas_version 42.0
%global gsettings_desktop_schemas_version 42
%global gtk3_version 3.15.3
%global geoclue_version 2.3.1
@ -10,17 +10,22 @@
%global major_version %%(echo %{version} | cut -f 1 -d '~' | cut -f 1 -d '.')
Name: gnome-settings-daemon
Version: 42.2
Release: 2
Summary: Settings of GNOME Sessions and related applications
Version: 43.0
Release: 1
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
License: GPLv2+
URL: https://download.gnome.org/sources/%{name}
URL: https://gitlab.gnome.org/GNOME/gnome-settings-daemon
Source0: https://download.gnome.org/sources/%{name}/%{major_version}/%{name}-%{tarball_version}.tar.xz
Source1: org.gnome.settings-daemon.plugins.power.gschema.override
BuildRequires: cups-devel gcc gettext meson >= 0.44.0 perl-interpreter pkgconfig(alsa)
# Backported from upstream
# https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/309
# https://bugzilla.redhat.com/show_bug.cgi?id=2128423
Patch0: 309.patch
BuildRequires: cups-devel gcc gettext meson >= 0.49.0 perl-interpreter pkgconfig(alsa)
BuildRequires: pkgconfig(colord) >= %{colord_version} pkgconfig(fontconfig) pkgconfig(geoclue-2.0) >= %{geoclue_version}
BuildRequires: pkgconfig(geocode-glib-1.0) >= %{geocode_glib_version} pkgconfig(glib-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(geocode-glib-2.0) >= %{geocode_glib_version} pkgconfig(glib-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(gnome-desktop-3.0) >= %{gnome_desktop_version} pkgconfig(gsettings-desktop-schemas) >= %{gsettings_desktop_schemas_version}
BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk3_version} pkgconfig(gudev-1.0) pkgconfig(gweather4)
BuildRequires: pkgconfig(lcms2) >= 2.2 pkgconfig(libcanberra-gtk3) pkgconfig(libgeoclue-2.0)
@ -29,7 +34,7 @@ BuildRequires: pkgconfig(librsvg-2.0) pkgconfig(nss) pkgconfig(polkit-gobject-1
BuildRequires: pkgconfig(x11) pkgconfig(xi) pkgconfig(xtst) pkgconfig(wayland-client)
BuildRequires: pkgconfig(libwacom) >= 0.7 pkgconfig(xorg-wacom) pkgconfig(gcr-base-3) pkgconfig(mm-glib) chrpath
Requires: colord >= %{colord_version} geoclue2 >= %{geoclue_version} geocode-glib >= %{geocode_glib_version} glib2 >= %{glib2_version}
Requires: colord >= %{colord_version} geoclue2 >= %{geoclue_version} geocode-glib2 >= %{geocode_glib_version} glib2 >= %{glib2_version}
Requires: gnome-desktop3 >= %{gnome_desktop_version} gsettings-desktop-schemas >= %{gsettings_desktop_schemas_version}
Requires: gtk3 >= %{gtk3_version} iio-sensor-proxy pkgconfig(gweather4)
@ -47,6 +52,7 @@ and other related development files of gnome-settings-daemon.
%prep
%autosetup -p1
sed -i '14s/false/true/' meson_options.txt
%build
%meson
@ -63,26 +69,27 @@ install -d $RPM_BUILD_ROOT%{_libdir}/gnome-settings-daemon-3.0/gtk-modules
chrpath -d %{buildroot}%{_libexecdir}/*
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
echo "%{_libdir}/gnome-settings-daemon-42" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
echo "%{_libdir}/gnome-settings-daemon-43" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%post
/sbin/ldconfig
%systemd_user_post %{systemd_units}
%postun
/sbin/ldconfig
%preun
%systemd_user_preun %{systemd_units}
%files -f %{name}.lang
%doc AUTHORS NEWS
%license COPYING
%doc AUTHORS NEWS README
%{_libexecdir}/gsd-*
%{_sysconfdir}/xdg/autostart/*
%{_sysconfdir}/xdg/Xwayland-session.d/00-xrdb
%{_userunitdir}/*
%{_userunitdir}/
%{_datadir}/glib-2.0/schemas/*
%{_datadir}/polkit-1/actions/*
%{_libdir}/gnome-settings-daemon-%{major_version}/libgsd.so
%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%{_udevrulesdir}/61-gnome-settings-daemon-rfkill.rules
/usr/lib/udev/rules.d/*.rules
%{_datadir}/gnome-settings-daemon/
@ -93,6 +100,9 @@ echo "%{_libdir}/gnome-settings-daemon-42" > %{buildroot}%{_sysconfdir}/ld.so.co
%{_libdir}/pkgconfig/gnome-settings-daemon.pc
%changelog
* Mon Jan 02 2023 lin zhang <lin.zhang@turbolinux.com.cn> - 43.0-1
- Update to 43.0
* Mon Jun 6 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 42.2-2
- modify the libgsd.so search path to /usr/lib64/gnome-settings-daemon-42