forked from aniani/vim
patch 8.2.4320: Athena and Motif: when maximized scrollbar position is wrong
Problem: Athena and Motif: when maximized scrollbar position is wrong. Solution: Implement the scrollbar padding functions. (closes #9712)
This commit is contained in:
@@ -1894,17 +1894,27 @@ gui_mch_set_scrollbar_pos(
|
|||||||
int
|
int
|
||||||
gui_mch_get_scrollbar_xpadding(void)
|
gui_mch_get_scrollbar_xpadding(void)
|
||||||
{
|
{
|
||||||
// TODO: Calculate the padding for adjust scrollbar position when the
|
int xpad;
|
||||||
// Window is maximized.
|
Dimension tw, ww;
|
||||||
return 0;
|
Position tx;
|
||||||
|
|
||||||
|
XtVaGetValues(textArea, XtNwidth, &tw, XtNx, &tx, NULL);
|
||||||
|
XtVaGetValues(vimShell, XtNwidth, &ww, NULL);
|
||||||
|
xpad = ww - tw - tx - gui.scrollbar_width;
|
||||||
|
return (xpad < 0) ? 0 : xpad;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
gui_mch_get_scrollbar_ypadding(void)
|
gui_mch_get_scrollbar_ypadding(void)
|
||||||
{
|
{
|
||||||
// TODO: Calculate the padding for adjust scrollbar position when the
|
int ypad;
|
||||||
// Window is maximized.
|
Dimension th, wh;
|
||||||
return 0;
|
Position ty;
|
||||||
|
|
||||||
|
XtVaGetValues(textArea, XtNheight, &th, XtNy, &ty, NULL);
|
||||||
|
XtVaGetValues(vimShell, XtNheight, &wh, NULL);
|
||||||
|
ypad = wh - th - ty - gui.scrollbar_height;
|
||||||
|
return (ypad < 0) ? 0 : ypad;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -1745,17 +1745,27 @@ gui_mch_set_scrollbar_pos(
|
|||||||
int
|
int
|
||||||
gui_mch_get_scrollbar_xpadding(void)
|
gui_mch_get_scrollbar_xpadding(void)
|
||||||
{
|
{
|
||||||
// TODO: Calculate the padding for adjust scrollbar position when the
|
int xpad;
|
||||||
// Window is maximized.
|
Dimension tw, ww;
|
||||||
return 0;
|
Position tx;
|
||||||
|
|
||||||
|
XtVaGetValues(textArea, XtNwidth, &tw, XtNx, &tx, NULL);
|
||||||
|
XtVaGetValues(vimShell, XtNwidth, &ww, NULL);
|
||||||
|
xpad = ww - tw - tx - gui.scrollbar_width;
|
||||||
|
return (xpad < 0) ? 0 : xpad;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
gui_mch_get_scrollbar_ypadding(void)
|
gui_mch_get_scrollbar_ypadding(void)
|
||||||
{
|
{
|
||||||
// TODO: Calculate the padding for adjust scrollbar position when the
|
int ypad;
|
||||||
// Window is maximized.
|
Dimension th, wh;
|
||||||
return 0;
|
Position ty;
|
||||||
|
|
||||||
|
XtVaGetValues(textArea, XtNheight, &th, XtNy, &ty, NULL);
|
||||||
|
XtVaGetValues(vimShell, XtNheight, &wh, NULL);
|
||||||
|
ypad = wh - th - ty - gui.scrollbar_height;
|
||||||
|
return (ypad < 0) ? 0 : ypad;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4320,
|
||||||
/**/
|
/**/
|
||||||
4319,
|
4319,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user