[gnome-settings-daemon] color/manager: Fix temperature notify type



commit 971db479fb0f5295f9c1ddd892a11a742c77e6fd
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Oct 29 10:59:01 2021 +0200

    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.

 plugins/color/gsd-color-manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]