[Xfce4-commits] [xfce/xfce4-settings] 01/01: display: Fix calculation of offset

noreply at xfce.org noreply at xfce.org
Tue Dec 11 19:52:52 CET 2018


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 967ae7e6bf2a00ce5fe9432a4f30451eefd0c77c
Author: Florian Schüller <florian.schueller at gmail.com>
Date:   Tue Nov 13 08:16:16 2018 +0100

    display: Fix calculation of offset
    
    The condition contained an "OR" so "other" value must not be overwritten. The "MAX" is the same behavior but always good.
---
 dialogs/display-settings/main.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 43278bf..9bb027d 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -2294,11 +2294,8 @@ lay_out_outputs_horizontally (void)
         output = list->data;
         if (output->connected && output->on)
         {
-            if ((gint)output->x + (gint)output->width > x || output->y > y)
-            {
-                y = output->y;
-                x = output->x + output->width;
-            }
+            y = MAX(output->y, y);
+            x = MAX(output->x + output->width, x);
         }
     }
 

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


More information about the Xfce4-commits mailing list