changeset 31942:f5675b905d89 v9.0.1303

patch 9.0.1303: Motif: scrollbar width/height wrong when maximized Commit: https://github.com/vim/vim/commit/094b8473edcc7531c942ac726dd575d95f5b622c Author: qsmodo <75080827+qsmodo@users.noreply.github.com> Date: Sat Feb 11 19:12:57 2023 +0000 patch 9.0.1303: Motif: scrollbar width/height wrong when maximized Problem: Motif: scrollbar width/height wrong when maximized. Solution: Set the width/height when creating the scrollbar. (closes https://github.com/vim/vim/issues/11946)
author Bram Moolenaar <Bram@vim.org>
date Sat, 11 Feb 2023 20:15:03 +0100
parents 75ae4ddf0999
children 46937eea56f9
files src/gui_motif.c src/version.c
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -1695,7 +1695,7 @@ gui_mch_set_scrollbar_pos(
 		XmNtopOffset, y,
 		XmNleftOffset, x,
 		XmNrightOffset, gui.which_scrollbars[SBAR_RIGHT]
-		? gui.scrollbar_width : 0,
+						     ? gui.scrollbar_width : 0,
 		XmNheight, h,
 		NULL);
     XtManageChild(sb->id);
@@ -1788,9 +1788,8 @@ gui_mch_create_scrollbar(
     int		orient)	// SBAR_VERT or SBAR_HORIZ
 {
     Arg		args[16];
-    int		n;
-
-    n = 0;
+    int		n = 0;
+
     XtSetArg(args[n], XmNminimum, 0); n++;
     XtSetArg(args[n], XmNorientation,
 	    (orient == SBAR_VERT) ? XmVERTICAL : XmHORIZONTAL); n++;
@@ -1801,18 +1800,21 @@ gui_mch_create_scrollbar(
 	    XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++;
 	    XtSetArg(args[n], XmNbottomAttachment, XmATTACH_OPPOSITE_FORM); n++;
 	    XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++;
+	    XtSetArg(args[n], XmNwidth, gui.scrollbar_width); n++;
 	    break;
 
 	case SBAR_RIGHT:
 	    XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++;
 	    XtSetArg(args[n], XmNbottomAttachment, XmATTACH_OPPOSITE_FORM); n++;
 	    XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++;
+	    XtSetArg(args[n], XmNwidth, gui.scrollbar_width); n++;
 	    break;
 
 	case SBAR_BOTTOM:
 	    XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++;
 	    XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++;
 	    XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); n++;
+	    XtSetArg(args[n], XmNheight, gui.scrollbar_height); n++;
 	    break;
     }
 
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1303,
+/**/
     1302,
 /**/
     1301,