summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2021-10-29 10:59:01 +0200
committerJonas Ådahl <jadahl@gmail.com>2021-12-07 09:42:06 +0100
commit971db479fb0f5295f9c1ddd892a11a742c77e6fd (patch)
tree1e92391c8c39d064b27af410c7c02291976fccaf /plugins
parent1e8b4be01e42b076ad491d522d6e98b4fd4b5e57 (diff)
downloadgnome-settings-daemon-971db479fb0f5295f9c1ddd892a11a742c77e6fd.tar.gz
color/manager: Fix temperature notify type
The org.gnome.SettingsDaemon.Color.Temperature property has the type 'u' which is a 32 bit unsigned integer. What we sent was a double (type 'd'). Make sure we send the right type in the notify signal.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/color/gsd-color-manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/color/gsd-color-manager.c b/plugins/color/gsd-color-manager.c
index 62a417eb..4d6d2832 100644
--- a/plugins/color/gsd-color-manager.c
+++ b/plugins/color/gsd-color-manager.c
@@ -23,6 +23,7 @@
#include <glib/gi18n.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
+#include <math.h>
#include "gnome-settings-profile.h"
#include "gsd-color-calibrate.h"
@@ -211,7 +212,7 @@ on_temperature_notify (GsdNightLight *nlight,
gdouble temperature = gsd_night_light_get_temperature (manager->nlight);
gsd_color_state_set_temperature (manager->state, temperature);
emit_property_changed (manager, "Temperature",
- g_variant_new_double (temperature));
+ g_variant_new_uint32 (roundf (temperature)));
}
static void