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 751713 - orientation: Initial orientation not getting set
orientation: Initial orientation not getting set
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2015-06-30 11:43 UTC by Bastien Nocera
Modified: 2015-07-02 14:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
orientation: Fix orientation setting on startup (8.00 KB, patch)
2015-07-01 17:38 UTC, Bastien Nocera
none Details | Review
orientation: Fix orientation setting on startup (8.42 KB, patch)
2015-07-02 14:05 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2015-06-30 11:43:16 UTC
We call it too early:
Jun 30 13:37:17 localhost.localdomain gnome-session[1646]: (gnome-settings-daemon:1726): orientation-plugin-WARNING **: Unable to call 'RotateTo': GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SettingsDaemon.XRANDR was not provided by any .service files
Comment 1 Bastien Nocera 2015-07-01 17:38:08 UTC
Created attachment 306546 [details] [review]
orientation: Fix orientation setting on startup

This makes sure that XRandR is actually available when trying to
rotate the screen during login as the GDBusProxy might have got
created but the service isn't available.
Comment 2 Rui Matos 2015-07-02 13:40:02 UTC
Review of attachment 306546 [details] [review]:

Otherwise looks good

::: plugins/orientation/gsd-orientation-manager.c
@@ -189,3 @@
         gint64 timestamp;
 
-        if (priv->xrandr_proxy == NULL) {

This should be replaced by if (!priv->has_xrandr)
Comment 3 Bastien Nocera 2015-07-02 14:05:51 UTC
Created attachment 306620 [details] [review]
orientation: Fix orientation setting on startup

This makes sure that XRandR is actually available when trying to
rotate the screen during login as the GDBusProxy might have got
created but the service isn't available.
Comment 4 Bastien Nocera 2015-07-02 14:06:00 UTC
(In reply to Rui Matos from comment #2)
> Review of attachment 306546 [details] [review] [review]:
> 
> Otherwise looks good
> 
> ::: plugins/orientation/gsd-orientation-manager.c
> @@ -189,3 @@
>          gint64 timestamp;
>  
> -        if (priv->xrandr_proxy == NULL) {
> 
> This should be replaced by if (!priv->has_xrandr)

do_xrandr_action() is only called from do_rotation(), and do_rotation() is called from orientation_lock_changed_cb() and properties_changed().

properties_changed() already has a guard, so I'll add a similar one to orientation_lock_changed_cb() instead.
Comment 5 Bastien Nocera 2015-07-02 14:06:39 UTC
Attachment 306620 [details] pushed as a5b063d - orientation: Fix orientation setting on startup