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

Nick Schermer noreply at xfce.org
Tue Jun 21 18:06:01 CEST 2011


Updating branch refs/heads/master
         to dbc73e9c47b381b87c7a5c60ab633fbc370e21f1 (commit)
       from 2304a2ea9c3533094c4a1a1f43fa48d4044869cf (commit)

commit dbc73e9c47b381b87c7a5c60ab633fbc370e21f1
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).

 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 5c323ea..3f2fd35 100644
--- a/panel/panel-window.c
+++ b/panel/panel-window.c
@@ -1495,28 +1495,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