[Xfce4-commits] <xfce4-panel:xfce-4.8> Panel: Fix off-by-one error in strut sizes (bug #7739).

Nick Schermer noreply at xfce.org
Tue Jun 21 22:18:04 CEST 2011


Updating branch refs/heads/xfce-4.8
         to 412495835f0cdce9e42e7a526a4b35c8d1f14ad3 (commit)
       from 3d2988903b849f414ce74bfb14703f58e5fb20d4 (commit)

commit 412495835f0cdce9e42e7a526a4b35c8d1f14ad3
Author: Dan Callaghan <djc at djc.id.au>
Date:   Sun Jun 19 10:48:52 2011 +1000

    Panel: Fix off-by-one error in strut sizes (bug #7739).
    
    (cherry picked from commit dbc73e9c47b381b87c7a5c60ab633fbc370e21f1)

 panel/panel-window.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/panel/panel-window.c b/panel/panel-window.c
index 43f18c2..26767b8 100644
--- a/panel/panel-window.c
+++ b/panel/panel-window.c
@@ -1483,28 +1483,28 @@ panel_window_screen_struts_set (PanelWindow *window)
       /* the window is snapped on the top screen edge */
       struts[STRUT_TOP] = alloc->y + alloc->height;
       struts[STRUT_TOP_START_X] = alloc->x;
-      struts[STRUT_TOP_END_X] = alloc->x + alloc->width;
+      struts[STRUT_TOP_END_X] = alloc->x + alloc->width - 1;
     }
   else if (window->struts_edge == STRUTS_EDGE_BOTTOM)
     {
       /* the window is snapped on the bottom screen edge */
       struts[STRUT_BOTTOM] = gdk_screen_get_height (window->screen) - alloc->y;
       struts[STRUT_BOTTOM_START_X] = alloc->x;
-      struts[STRUT_BOTTOM_END_X] = alloc->x + alloc->width;
+      struts[STRUT_BOTTOM_END_X] = alloc->x + alloc->width - 1;
     }
   else if (window->struts_edge == STRUTS_EDGE_LEFT)
     {
       /* the window is snapped on the left screen edge */
       struts[STRUT_LEFT] = alloc->x + alloc->width;
       struts[STRUT_LEFT_START_Y] = alloc->y;
-      struts[STRUT_LEFT_END_Y] = alloc->y + alloc->height;
+      struts[STRUT_LEFT_END_Y] = alloc->y + alloc->height - 1;
     }
   else if (window->struts_edge == STRUTS_EDGE_RIGHT)
     {
       /* the window is snapped on the right screen edge */
       struts[STRUT_RIGHT] = gdk_screen_get_width (window->screen) - alloc->x;
       struts[STRUT_RIGHT_START_Y] = alloc->y;
-      struts[STRUT_RIGHT_END_Y] = alloc->y + alloc->height;
+      struts[STRUT_RIGHT_END_Y] = alloc->y + alloc->height - 1;
     }
 
   /* store the new struts */



More information about the Xfce4-commits mailing list