From 51114157d83ef3d4a2347de58a97e62d4e8cd065 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 30 Sep 2014 10:55:23 +0000 Subject: drop space resource, at it is covered by border --- Display.c | 20 +++++++------------- DisplayP.h | 1 - 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/Display.c b/Display.c index 1212950..7b0aea1 100644 --- a/Display.c +++ b/Display.c @@ -18,8 +18,6 @@ static Boolean SetValues(Widget, Widget, Widget, ArgList, Cardinal *); #define Offset(field) XtOffsetOf(DisplayRec, display.field) static XtResource resources[] = { - { XtNspace, XtCSpace, XtRDimension, sizeof(Dimension), - Offset(space), XtRImmediate, (XtPointer)2 }, { XtNdata, XtCData, XtRPointer, sizeof(int **), Offset(data), XtRPointer, NULL }, }; @@ -121,13 +119,11 @@ ChangeManaged(Widget w) XtSetArg(arg, XtNdata, &dw->display.data[i]); XtGetValues(child, &arg, 1); XtMoveWidget(child, - width + dw->display.space, dw->display.space); + width, 0); width += child->core.width - + 2 * child->core.border_width - + 2 * dw->display.space; + + 2 * child->core.border_width; height = child->core.height - + 2 * child->core.border_width - + 2 * dw->display.space; + + 2 * child->core.border_width; } } w->core.width = width; @@ -145,16 +141,14 @@ Resize(Widget w) Trace(w); - width = w->core.width / n - 2 * dw->display.space; - height = w->core.height - 2 * dw->display.space; + width = w->core.width / n; + height = w->core.height; for (i = 0; i < dw->composite.num_children; i++) { child = dw->composite.children[i]; if (XtIsManaged(child)) { - x = i * (width + dw->display.space - + child->core.border_width) - + dw->display.space; - y = dw->display.space; + x = i * (width + child->core.border_width); + y = 0; XtConfigureWidget(child, x, y, width - 2 * child->core.border_width, height - 2 * child->core.border_width, diff --git a/DisplayP.h b/DisplayP.h index f58ffca..668843e 100644 --- a/DisplayP.h +++ b/DisplayP.h @@ -6,7 +6,6 @@ #include "Display.h" typedef struct { - Dimension space; int **data; } DisplayPart; -- cgit v1.2.3