diff options
author | marha <marha@users.sourceforge.net> | 2012-06-15 14:13:55 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-06-15 14:13:55 +0200 |
commit | 1501699f035761714a1d4540d65a1afb7c567abe (patch) | |
tree | 4dd4d15583d9d542a699833331f34ceb10bbd6c3 /libXaw/src/Viewport.c | |
parent | 38c18d1733e4eb5cc560a34bfe2470e01a06205d (diff) | |
parent | a33de30073bfa0ee1abba186dba9fa52cf0aa23a (diff) | |
download | vcxsrv-1501699f035761714a1d4540d65a1afb7c567abe.tar.gz vcxsrv-1501699f035761714a1d4540d65a1afb7c567abe.tar.bz2 vcxsrv-1501699f035761714a1d4540d65a1afb7c567abe.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
freetype/src/raster/ftraster.c
openssl/Makefile
Diffstat (limited to 'libXaw/src/Viewport.c')
-rw-r--r-- | libXaw/src/Viewport.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/libXaw/src/Viewport.c b/libXaw/src/Viewport.c index 68bd1682b..082682f82 100644 --- a/libXaw/src/Viewport.c +++ b/libXaw/src/Viewport.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -313,12 +313,12 @@ XawViewportInitialize(Widget request, Widget cnew, w->viewport.clip = XtCreateManagedWidget("clip", widgetClass, cnew, clip_args, arg_cnt); - if (!w->viewport.forcebars) + if (!w->viewport.forcebars) return; /* If we are not forcing the bars then we are done */ - if (w->viewport.allowhoriz) + if (w->viewport.allowhoriz) (void)CreateScrollbar(w, True); - if (w->viewport.allowvert) + if (w->viewport.allowvert) (void)CreateScrollbar(w, False); h_bar = w->viewport.horiz_bar; @@ -538,7 +538,7 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) if (w->viewport.forcebars) { needsvert = w->viewport.allowvert; needshoriz = w->viewport.allowhoriz; - ComputeWithForceBars(widget, query, &intended, + ComputeWithForceBars(widget, query, &intended, &clip_width, &clip_height); } else { @@ -553,7 +553,7 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) * but we don't set the mode bits until after we decide that the * child's preferences are not acceptable */ - if (!w->viewport.allowhoriz) + if (!w->viewport.allowhoriz) intended.request_mode |= CWWidth; if (XtWidth(child) < clip_width) @@ -566,7 +566,7 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) else intended.height = XtHeight(child); - if (!w->viewport.allowvert) + if (!w->viewport.allowvert) intended.request_mode |= CWHeight; if (!query) { @@ -645,7 +645,7 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) XtHeight(w->viewport.horiz_bar) + XtBorderWidth(w->viewport.horiz_bar) : 0); XtResizeWidget(clip, clip_width, clip_height, 0); - + if (w->viewport.horiz_bar != NULL) { Widget bar = w->viewport.horiz_bar; @@ -728,7 +728,7 @@ ComputeWithForceBars(Widget widget, Bool query, XtWidgetGeometry *intended, * Thus if needsvert is set it MUST have a scrollbar */ if (w->viewport.allowvert) { - if (w->viewport.vert_bar == NULL) + if (w->viewport.vert_bar == NULL) w->viewport.vert_bar = CreateScrollbar(w, False); *clip_width -= XtWidth(w->viewport.vert_bar) + @@ -736,7 +736,7 @@ ComputeWithForceBars(Widget widget, Bool query, XtWidgetGeometry *intended, } if (w->viewport.allowhoriz) { - if (w->viewport.horiz_bar == NULL) + if (w->viewport.horiz_bar == NULL) w->viewport.horiz_bar = CreateScrollbar(w, True); *clip_height -= XtHeight(w->viewport.horiz_bar) + @@ -758,7 +758,7 @@ ComputeWithForceBars(Widget widget, Bool query, XtWidgetGeometry *intended, if (query) { if (w->viewport.allowvert || w->viewport.allowhoriz) { XtQueryGeometry(child, intended, &preferred); - + if (!(intended->request_mode & CWWidth)) { if (preferred.request_mode & CWWidth) intended->width = preferred.width; @@ -874,11 +874,11 @@ GeometryRequestPlusScrollbar(ViewportWidget w, Bool horizontal, #define WidthChange() (request->width != XtWidth(w)) #define HeightChange() (request->height != XtHeight(w)) -static XtGeometryResult +static XtGeometryResult QueryGeometry(ViewportWidget w, XtWidgetGeometry *request, XtWidgetGeometry *reply_return) -{ - if (w->viewport.allowhoriz && w->viewport.allowvert) +{ + if (w->viewport.allowhoriz && w->viewport.allowvert) return (TestSmaller(w, request, reply_return)); else if (w->viewport.allowhoriz && !w->viewport.allowvert) { @@ -942,7 +942,7 @@ XawViewportGeometryManager(Widget child, XtWidgetGeometry *request, if (rWidth && XtWidth(w) != request->width) { if (w->viewport.allowhoriz && request->width > XtWidth(w)) { /* horizontal scrollbar will be needed so possibly reduce height */ - Widget bar; + Widget bar; if ((bar = w->viewport.horiz_bar) == NULL) bar = CreateScrollbar(w, True); @@ -1058,12 +1058,12 @@ XawViewportSetLocation if (xoff > 1.0) /* scroll to right */ x = XtWidth(child); - else if (xoff < 0.0) /* if the offset is < 0.0 nothing */ + else if (xoff < 0.0) /* if the offset is < 0.0 nothing */ x = XtX(child); else x = (float)XtWidth(child) * xoff; - if (yoff > 1.0) + if (yoff > 1.0) y = XtHeight(child); else if (yoff < 0.0) y = XtY(child); |