summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-03-24 18:04:49 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-24 18:04:49 +0000
commit9dd42a631162a8561bd7c4b0e89afd21f7994d8c (patch)
tree550e6b027f0a11ce6ffe2d6b45ad1d8d00449e5d
parent1e2c4175dce903986dac66ba9326ae562b159421 (diff)
patch 8.2.4621: crash when using the tabline right-click menuv8.2.4621
Problem: Crash when using the tabline right-click menu. Solution: Use XtPointer for XmNuserData. (closes #10009)
-rw-r--r--src/gui_motif.c12
-rw-r--r--src/version.c2
2 files changed, 8 insertions, 6 deletions
diff --git a/src/gui_motif.c b/src/gui_motif.c
index 740288827b..56d3f35723 100644
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -142,12 +142,12 @@ tabline_button_cb(
XtPointer client_data UNUSED,
XtPointer call_data UNUSED)
{
- int cmd, tab_idx;
+ XtPointer cmd, tab_idx;
XtVaGetValues(w, XmNuserData, &cmd, NULL);
XtVaGetValues(tabLine_menu, XmNuserData, &tab_idx, NULL);
- send_tabline_menu_event(tab_idx, cmd);
+ send_tabline_menu_event((int)(long)tab_idx, (int)(long)cmd);
}
/*
@@ -254,7 +254,7 @@ tabline_menu_cb(
XtVaGetValues(tab_w, XmNpageNumber, &tab_idx, NULL);
}
- XtVaSetValues(tabLine_menu, XmNuserData, tab_idx, NULL);
+ XtVaSetValues(tabLine_menu, XmNuserData, (XtPointer)(long)tab_idx, NULL);
XtVaGetValues(tabLine_menu, XmNchildren, &children, XmNnumChildren,
&numChildren, NULL);
XtManageChildren(children, numChildren);
@@ -517,7 +517,7 @@ gui_x11_create_widgets(void)
// Add the buttons to the tabline popup menu
n = 0;
- XtSetArg(args[n], XmNuserData, TABLINE_MENU_CLOSE); n++;
+ XtSetArg(args[n], XmNuserData, (XtPointer)TABLINE_MENU_CLOSE); n++;
xms = XmStringCreate((char *)"Close tab", STRING_TAG);
XtSetArg(args[n], XmNlabelString, xms); n++;
button = XmCreatePushButton(tabLine_menu, "Close", args, n);
@@ -526,7 +526,7 @@ gui_x11_create_widgets(void)
XmStringFree(xms);
n = 0;
- XtSetArg(args[n], XmNuserData, TABLINE_MENU_NEW); n++;
+ XtSetArg(args[n], XmNuserData, (XtPointer)TABLINE_MENU_NEW); n++;
xms = XmStringCreate((char *)"New Tab", STRING_TAG);
XtSetArg(args[n], XmNlabelString, xms); n++;
button = XmCreatePushButton(tabLine_menu, "New Tab", args, n);
@@ -535,7 +535,7 @@ gui_x11_create_widgets(void)
XmStringFree(xms);
n = 0;
- XtSetArg(args[n], XmNuserData, TABLINE_MENU_OPEN); n++;
+ XtSetArg(args[n], XmNuserData, (XtPointer)TABLINE_MENU_OPEN); n++;
xms = XmStringCreate((char *)"Open tab...", STRING_TAG);
XtSetArg(args[n], XmNlabelString, xms); n++;
button = XmCreatePushButton(tabLine_menu, "Open tab...", args, n);
diff --git a/src/version.c b/src/version.c
index 6405e3b855..bcb70e8d4d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4621,
+/**/
4620,
/**/
4619,