gnome-settings-daemon: update to 3.38.0
This commit is contained in:
parent
fcfda50860
commit
6440d7b619
|
@ -0,0 +1,136 @@
|
||||||
|
From 3845b3a7b58f26ec68dbc1c457ead06f4881180b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel Kolesa <daniel@octaforge.org>
|
||||||
|
Date: Fri, 14 Aug 2020 17:48:21 +0200
|
||||||
|
Subject: [PATCH] The new logind brightness code doesn't work with elogind.
|
||||||
|
|
||||||
|
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/commit/cd051e6c7ccfb7e7b0ec440409c559b2e51284e8
|
||||||
|
---
|
||||||
|
plugins/power/gsd-backlight.c | 77 ++++-------------------------------
|
||||||
|
1 file changed, 7 insertions(+), 70 deletions(-)
|
||||||
|
|
||||||
|
diff --git plugins/power/gsd-backlight.c plugins/power/gsd-backlight.c
|
||||||
|
index ca5f272..4acc2e5 100644
|
||||||
|
--- plugins/power/gsd-backlight.c
|
||||||
|
+++ plugins/power/gsd-backlight.c
|
||||||
|
@@ -40,8 +40,6 @@ struct _GsdBacklight
|
||||||
|
gint brightness_step;
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
- GDBusProxy *logind_proxy;
|
||||||
|
-
|
||||||
|
GUdevClient *udev;
|
||||||
|
GUdevDevice *udev_device;
|
||||||
|
|
||||||
|
@@ -61,10 +59,6 @@ enum {
|
||||||
|
PROP_LAST,
|
||||||
|
};
|
||||||
|
|
||||||
|
-#define SYSTEMD_DBUS_NAME "org.freedesktop.login1"
|
||||||
|
-#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1/session/auto"
|
||||||
|
-#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Session"
|
||||||
|
-
|
||||||
|
static GParamSpec *props[PROP_LAST];
|
||||||
|
|
||||||
|
static void gsd_backlight_initable_iface_init (GInitableIface *iface);
|
||||||
|
@@ -482,30 +476,13 @@ gsd_backlight_set_brightness_val_async (GsdBacklight *backlight,
|
||||||
|
if (backlight->udev_device != NULL) {
|
||||||
|
BacklightHelperData *task_data;
|
||||||
|
|
||||||
|
- if (backlight->logind_proxy) {
|
||||||
|
- g_dbus_proxy_call (backlight->logind_proxy,
|
||||||
|
- "SetBrightness",
|
||||||
|
- g_variant_new ("(ssu)",
|
||||||
|
- "backlight",
|
||||||
|
- g_udev_device_get_name (backlight->udev_device),
|
||||||
|
- backlight->brightness_target),
|
||||||
|
- G_DBUS_CALL_FLAGS_NONE,
|
||||||
|
- -1, NULL,
|
||||||
|
- NULL, NULL);
|
||||||
|
-
|
||||||
|
- percent = ABS_TO_PERCENTAGE (backlight->brightness_min,
|
||||||
|
- backlight->brightness_max,
|
||||||
|
- backlight->brightness_target);
|
||||||
|
- g_task_return_int (task, percent);
|
||||||
|
- } else {
|
||||||
|
- task_data = g_new0 (BacklightHelperData, 1);
|
||||||
|
- task_data->value = backlight->brightness_target;
|
||||||
|
- g_task_set_task_data (task, task_data, backlight_task_data_destroy);
|
||||||
|
-
|
||||||
|
- /* Task is set up now. Queue it and ensure we are working something. */
|
||||||
|
- g_queue_push_tail (&backlight->tasks, task);
|
||||||
|
- gsd_backlight_process_taskqueue (backlight);
|
||||||
|
- }
|
||||||
|
+ task_data = g_new0 (BacklightHelperData, 1);
|
||||||
|
+ task_data->value = backlight->brightness_target;
|
||||||
|
+ g_task_set_task_data (task, task_data, backlight_task_data_destroy);
|
||||||
|
+
|
||||||
|
+ /* Task is set up now. Queue it and ensure we are working something. */
|
||||||
|
+ g_queue_push_tail (&backlight->tasks, task);
|
||||||
|
+ gsd_backlight_process_taskqueue (backlight);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
@@ -823,7 +800,6 @@ gsd_backlight_initable_init (GInitable *initable,
|
||||||
|
{
|
||||||
|
GsdBacklight *backlight = GSD_BACKLIGHT (initable);
|
||||||
|
GnomeRROutput* output = NULL;
|
||||||
|
- GError *logind_error = NULL;
|
||||||
|
|
||||||
|
if (cancellable != NULL) {
|
||||||
|
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||||
|
@@ -832,44 +808,6 @@ gsd_backlight_initable_init (GInitable *initable,
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
- backlight->logind_proxy =
|
||||||
|
- g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
||||||
|
- 0,
|
||||||
|
- NULL,
|
||||||
|
- SYSTEMD_DBUS_NAME,
|
||||||
|
- SYSTEMD_DBUS_PATH,
|
||||||
|
- SYSTEMD_DBUS_INTERFACE,
|
||||||
|
- NULL, &logind_error);
|
||||||
|
- if (backlight->logind_proxy) {
|
||||||
|
- /* Check that the SetBrightness method does exist */
|
||||||
|
- g_dbus_proxy_call_sync (backlight->logind_proxy,
|
||||||
|
- "SetBrightness", NULL,
|
||||||
|
- G_DBUS_CALL_FLAGS_NONE, -1,
|
||||||
|
- NULL, &logind_error);
|
||||||
|
-
|
||||||
|
- if (g_error_matches (logind_error, G_DBUS_ERROR,
|
||||||
|
- G_DBUS_ERROR_INVALID_ARGS)) {
|
||||||
|
- /* We are calling the method with no arguments, so
|
||||||
|
- * this is expected.
|
||||||
|
- */
|
||||||
|
- g_clear_error (&logind_error);
|
||||||
|
- } else if (g_error_matches (logind_error, G_DBUS_ERROR,
|
||||||
|
- G_DBUS_ERROR_UNKNOWN_METHOD)) {
|
||||||
|
- /* systemd version is too old, so ignore.
|
||||||
|
- */
|
||||||
|
- g_clear_error (&logind_error);
|
||||||
|
- g_clear_object (&backlight->logind_proxy);
|
||||||
|
- } else {
|
||||||
|
- /* Fail on anything else */
|
||||||
|
- g_clear_object (&backlight->logind_proxy);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (logind_error) {
|
||||||
|
- g_warning ("No logind found: %s", logind_error->message);
|
||||||
|
- g_error_free (logind_error);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
/* Try finding a udev device. */
|
||||||
|
if (gsd_backlight_udev_init (backlight))
|
||||||
|
goto found;
|
||||||
|
@@ -911,7 +849,6 @@ gsd_backlight_finalize (GObject *object)
|
||||||
|
#ifdef __linux__
|
||||||
|
g_assert (backlight->active_task == NULL);
|
||||||
|
g_assert (g_queue_is_empty (&backlight->tasks));
|
||||||
|
- g_clear_object (&backlight->logind_proxy);
|
||||||
|
g_clear_object (&backlight->udev);
|
||||||
|
g_clear_object (&backlight->udev_device);
|
||||||
|
if (backlight->idle_update) {
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
# Template file for 'gnome-settings-daemon'
|
# Template file for 'gnome-settings-daemon'
|
||||||
pkgname=gnome-settings-daemon
|
pkgname=gnome-settings-daemon
|
||||||
version=3.34.1
|
version=3.38.0
|
||||||
revision=2
|
revision=1
|
||||||
build_style=meson
|
build_style=meson
|
||||||
configure_args+="-Dsystemd=false"
|
configure_args+="-Dsystemd=false"
|
||||||
hostmakedepends="cmake docbook-xsl glib-devel libglib-devel libxslt perl pkg-config"
|
hostmakedepends="cmake docbook-xsl gettext glib-devel libglib-devel libxslt
|
||||||
|
perl pkg-config"
|
||||||
makedepends="NetworkManager-devel alsa-lib-devel colord-devel cups-devel gcr-devel
|
makedepends="NetworkManager-devel alsa-lib-devel colord-devel cups-devel gcr-devel
|
||||||
geoclue2-devel gnome-desktop-devel ibus-devel libcanberra-devel libgnomekbd-devel
|
geoclue2-devel gnome-desktop-devel ibus-devel libcanberra-devel libgnomekbd-devel
|
||||||
libgweather-devel libnotify-devel librsvg-devel libwacom-devel nss-devel
|
libgweather-devel libnotify-devel librsvg-devel libwacom-devel nss-devel
|
||||||
|
@ -12,13 +13,13 @@ makedepends="NetworkManager-devel alsa-lib-devel colord-devel cups-devel gcr-dev
|
||||||
xf86-input-wacom-devel"
|
xf86-input-wacom-devel"
|
||||||
depends="hicolor-icon-theme pulseaudio"
|
depends="hicolor-icon-theme pulseaudio"
|
||||||
checkdepends="elogind libnotify python3-dbusmock python3-gobject
|
checkdepends="elogind libnotify python3-dbusmock python3-gobject
|
||||||
python3-pycodestyle"
|
python3-pycodestyle which hwids eudev"
|
||||||
short_desc="GNOME settings daemon"
|
short_desc="GNOME settings daemon"
|
||||||
maintainer="Enno Boland <gottox@voidlinux.org>"
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
||||||
license="GPL-3.0-or-later"
|
license="GPL-3.0-or-later"
|
||||||
homepage="https://gitlab.gnome.org/GNOME/gnome-settings-daemon"
|
homepage="https://gitlab.gnome.org/GNOME/gnome-settings-daemon"
|
||||||
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
|
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
|
||||||
checksum=9981a20babf8da7744b7fbe175b9e36078bf08f3bf65fe5aedeb82cfe27ac11f
|
checksum=b7ed5b5fab9aad192ceed6a95be2805124e3c63c46891bbae076f7ec3fd6792e
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
hostmakedepends+=" polkit"
|
hostmakedepends+=" polkit"
|
||||||
|
|
Loading…
Reference in New Issue