mirror of
https://github.com/openbsd/xenocara.git
synced 2025-12-11 11:49:01 +00:00
xterm-236. Tested by form@ and simon@.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $XTermId: scrollbar.c,v 1.134 2008/02/28 01:07:30 tom Exp $ */
|
||||
/* $XTermId: scrollbar.c,v 1.136 2008/06/03 20:55:33 tom Exp $ */
|
||||
|
||||
/* $XFree86: xc/programs/xterm/scrollbar.c,v 3.48 2006/02/13 01:14:59 dickey Exp $ */
|
||||
|
||||
@@ -180,17 +180,13 @@ DoResizeScreen(XtermWidget xw)
|
||||
MaxCols(screen),
|
||||
reqHeight, reqWidth));
|
||||
|
||||
geomreqresult = XtMakeResizeRequest((Widget) xw, reqWidth, reqHeight,
|
||||
&repWidth, &repHeight);
|
||||
TRACE(("scrollbar.c XtMakeResizeRequest %dx%d -> %dx%d (status %d)\n",
|
||||
reqHeight, reqWidth,
|
||||
repHeight, repWidth,
|
||||
geomreqresult));
|
||||
geomreqresult = REQ_RESIZE((Widget) xw, reqWidth, reqHeight,
|
||||
&repWidth, &repHeight);
|
||||
|
||||
if (geomreqresult == XtGeometryAlmost) {
|
||||
TRACE(("...almost, retry screensize %dx%d\n", repHeight, repWidth));
|
||||
geomreqresult = XtMakeResizeRequest((Widget) xw, repWidth,
|
||||
repHeight, NULL, NULL);
|
||||
geomreqresult = REQ_RESIZE((Widget) xw, repWidth,
|
||||
repHeight, NULL, NULL);
|
||||
}
|
||||
|
||||
if (geomreqresult != XtGeometryYes) {
|
||||
@@ -327,29 +323,31 @@ ResizeScrollBar(XtermWidget xw)
|
||||
{
|
||||
TScreen *screen = &(xw->screen);
|
||||
|
||||
int height = screen->fullVwin.height + screen->border * 2;
|
||||
int width = screen->scrollWidget->core.width;
|
||||
int ypos = -ScrollBarBorder(xw);
|
||||
if (screen->scrollWidget != 0) {
|
||||
int height = screen->fullVwin.height + screen->border * 2;
|
||||
int width = screen->scrollWidget->core.width;
|
||||
int ypos = -ScrollBarBorder(xw);
|
||||
#ifdef SCROLLBAR_RIGHT
|
||||
int xpos = ((xw->misc.useRight)
|
||||
? (screen->fullVwin.fullwidth -
|
||||
screen->scrollWidget->core.width -
|
||||
BorderWidth(screen->scrollWidget))
|
||||
: -ScrollBarBorder(xw));
|
||||
int xpos = ((xw->misc.useRight)
|
||||
? (screen->fullVwin.fullwidth -
|
||||
screen->scrollWidget->core.width -
|
||||
BorderWidth(screen->scrollWidget))
|
||||
: -ScrollBarBorder(xw));
|
||||
#else
|
||||
int xpos = -ScrollBarBorder(xw);
|
||||
int xpos = -ScrollBarBorder(xw);
|
||||
#endif
|
||||
|
||||
TRACE(("ResizeScrollBar at %d,%d %dx%d\n", ypos, xpos, height, width));
|
||||
TRACE(("ResizeScrollBar at %d,%d %dx%d\n", ypos, xpos, height, width));
|
||||
|
||||
XtConfigureWidget(
|
||||
screen->scrollWidget,
|
||||
xpos,
|
||||
ypos,
|
||||
width,
|
||||
height,
|
||||
BorderWidth(screen->scrollWidget));
|
||||
ScrollBarDrawThumb(screen->scrollWidget);
|
||||
XtConfigureWidget(
|
||||
screen->scrollWidget,
|
||||
xpos,
|
||||
ypos,
|
||||
width,
|
||||
height,
|
||||
BorderWidth(screen->scrollWidget));
|
||||
ScrollBarDrawThumb(screen->scrollWidget);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user