mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-15 21:57:02 +02:00
gnome-settings-daemon: update to 47.2.
This commit is contained in:
parent
15fb933da5
commit
a86a868be5
2 changed files with 2 additions and 138 deletions
|
@ -1,136 +0,0 @@
|
|||
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
|
||||
--- a/plugins/power/gsd-backlight.c
|
||||
+++ b/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,6 +1,6 @@
|
|||
# Template file for 'gnome-settings-daemon'
|
||||
pkgname=gnome-settings-daemon
|
||||
version=46.0
|
||||
version=47.2
|
||||
revision=1
|
||||
build_style=meson
|
||||
configure_args="-Dsystemd=false"
|
||||
|
@ -21,7 +21,7 @@ license="GPL-3.0-or-later"
|
|||
homepage="https://gitlab.gnome.org/GNOME/gnome-settings-daemon"
|
||||
changelog="https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/raw/master/NEWS"
|
||||
distfiles="${GNOME_SITE}/gnome-settings-daemon/${version%.*}/gnome-settings-daemon-${version}.tar.xz"
|
||||
checksum=0b9a0f64fa18a8e7e09b4c95a3f754fa033c2cdbd2dc35701f0618572c1cb3d7
|
||||
checksum=1eb758862e888f55a0869193087f1cfbcc7a1163654e630099ff4342dd3f6a5a
|
||||
CFLAGS="-UG_DISABLE_ASSERT"
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue