After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749670 - orientation: Port to iio-sensor-proxy
orientation: Port to iio-sensor-proxy
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: plugins
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2015-05-21 09:56 UTC by Bastien Nocera
Modified: 2015-05-27 09:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
orientation: Port to iio-sensor-proxy (16.93 KB, patch)
2015-05-21 09:56 UTC, Bastien Nocera
none Details | Review
orientation: Port to iio-sensor-proxy (17.96 KB, patch)
2015-05-21 14:04 UTC, Bastien Nocera
none Details | Review
orientation: Port to iio-sensor-proxy (20.22 KB, patch)
2015-05-23 14:20 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2015-05-21 09:56:06 UTC
.
Comment 1 Bastien Nocera 2015-05-21 09:56:10 UTC
Created attachment 303732 [details] [review]
orientation: Port to iio-sensor-proxy
Comment 2 Bastien Nocera 2015-05-21 14:04:28 UTC
Created attachment 303760 [details] [review]
orientation: Port to iio-sensor-proxy

Instead of talking directly to udev, which can only support a single
type of accelerometer, talk to iio-sensor-proxy over D-Bus.
Comment 3 Rui Matos 2015-05-22 17:19:33 UTC
Review of attachment 303760 [details] [review]:

::: plugins/orientation/gsd-orientation-manager.c
@@ +357,3 @@
+                                                          NULL);
+
+        g_dbus_proxy_call_sync (p->iio_proxy,

Should check if we really got a valid ->iio_proxy before this

@@ +367,3 @@
+                          G_CALLBACK (properties_changed), manager);
+
+        properties_changed (manager->priv->iio_proxy, NULL, NULL, manager);

If we get the iio proxy before the xrandr proxy won't we miss setting the initial rotation?

@@ +442,3 @@
+                g_cancellable_cancel (p->cancellable);
+                g_clear_object (&p->cancellable);
+        }

This was already there but we should really clear ->connection and ->xrandr_proxy here too.

In fact we no longer need to keep ->connection around so let's just drop it
Comment 4 Bastien Nocera 2015-05-23 14:20:15 UTC
Created attachment 303859 [details] [review]
orientation: Port to iio-sensor-proxy

Instead of talking directly to udev, which can only support a single
type of accelerometer, talk to iio-sensor-proxy over D-Bus.
Comment 5 Rui Matos 2015-05-23 18:30:50 UTC
Review of attachment 303859 [details] [review]:

Looks fine
Comment 6 Bastien Nocera 2015-05-27 09:04:27 UTC
Attachment 303859 [details] pushed as b7f6fe3 - orientation: Port to iio-sensor-proxy