[Xfce4-commits] [xfce/xfce4-settings] 09/18: display: Keep settings editable even if profile is active

noreply at xfce.org noreply at xfce.org
Thu Apr 4 23:03:07 CEST 2019


This is an automated email from the git hooks/post-receive script.

o   c   h   o   s   i       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-settings.

commit b7194c83da0a31f373f75c4e3d92037a9c4e2163
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Sat Mar 30 21:55:47 2019 +0100

    display: Keep settings editable even if profile is active
---
 common/xfce-randr.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/common/xfce-randr.c b/common/xfce-randr.c
index 98ccb59..44ef694 100644
--- a/common/xfce-randr.c
+++ b/common/xfce-randr.c
@@ -496,11 +496,25 @@ xfce_randr_apply (XfceRandr     *randr,
                   const gchar   *scheme,
                   XfconfChannel *channel)
 {
+    gboolean autoenable;
+
     g_return_if_fail (randr != NULL && scheme != NULL);
     g_return_if_fail (XFCONF_IS_CHANNEL (channel));
 
+    /* Temporarily disable auto-enabling of profiles (if active).
+       Otherwise the user (changing settings in the display settings dialog) and
+       xfsettingsd (re-applying the unchanged profile) will fight against each other.
+       (Spoiler alert: xfsettingsd always wins!) */
+    autoenable = xfconf_channel_get_bool (channel, "/AutoEnableProfiles", FALSE);
+    if (autoenable)
+        xfconf_channel_set_bool (channel, "/AutoEnableProfiles", !autoenable);
+
     /* tell the helper to apply this theme */
     xfconf_channel_set_string (channel, "/Schemes/Apply", scheme);
+
+    /* Re-enable auto-enabling of profiles (if it was previously enabled) */
+    if (autoenable)
+        xfconf_channel_set_bool (channel, "/AutoEnableProfiles", autoenable);
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list