summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui_x11.c3
-rw-r--r--src/os_unix.c30
-rw-r--r--src/version.c2
3 files changed, 27 insertions, 8 deletions
diff --git a/src/gui_x11.c b/src/gui_x11.c
index 3f2a25675..2842fa092 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -1538,8 +1538,11 @@ gui_mch_init()
attr.depth = DefaultDepthOfScreen(scr);
if (!icon)
+ {
XpmCreatePixmapFromData(dsp, root_window, magick, &icon,
&icon_mask, &attr);
+ XpmFreeAttributes(&attr);
+ }
# ifdef FEAT_GUI_ATHENA
XtVaSetValues(vimShell, XtNiconPixmap, icon, XtNiconMask, icon_mask, NULL);
diff --git a/src/os_unix.c b/src/os_unix.c
index b9bab9478..7bad7e9d4 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -209,6 +209,7 @@ typedef struct
{
SmcConn smcconn; /* The SM connection ID */
IceConn iceconn; /* The ICE connection ID */
+ char *clientid; /* The client ID for the current smc session */
Bool save_yourself; /* If we're in the middle of a save_yourself */
Bool shutdown; /* If we're in shutdown mode */
} xsmp_config_T;
@@ -2887,16 +2888,28 @@ mch_free_mem()
if (clip_plus.owned)
clip_lose_selection(&clip_plus);
# endif
-# if (defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)) || defined(PROTO)
+# if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)
if (xterm_Shell != (Widget)0)
XtDestroyWidget(xterm_Shell);
+# ifndef LESSTIF_VERSION
+ /* Lesstif crashes here, lose some memory */
if (xterm_dpy != NULL)
XtCloseDisplay(xterm_dpy);
if (app_context != (XtAppContext)NULL)
+ {
XtDestroyApplicationContext(app_context);
+# ifdef FEAT_X11
+ x11_display = NULL; /* freed by XtDestroyApplicationContext() */
+# endif
+ }
+# endif
# endif
# ifdef FEAT_X11
- if (x11_display != NULL && x11_display != xterm_dpy)
+ if (x11_display != NULL
+# ifdef FEAT_XCLIPBOARD
+ && x11_display != xterm_dpy
+# endif
+ )
XCloseDisplay(x11_display);
# endif
# if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK)
@@ -6290,22 +6303,22 @@ clear_xterm_clip()
}
if (xterm_dpy != NULL)
{
-#if 0
+# if 0
/* Lesstif and Solaris crash here, lose some memory */
XtCloseDisplay(xterm_dpy);
-#endif
+# endif
if (x11_display == xterm_dpy)
x11_display = NULL;
xterm_dpy = NULL;
}
-#if 0
+# if 0
if (app_context != (XtAppContext)NULL)
{
/* Lesstif and Solaris crash here, lose some memory */
XtDestroyApplicationContext(app_context);
app_context = (XtAppContext)NULL;
}
-#endif
+# endif
}
# endif
@@ -6557,7 +6570,6 @@ static int dummy;
xsmp_init(void)
{
char errorstring[80];
- char *clientid;
SmcCallbacks smcallbacks;
#if 0
SmPropValue smname;
@@ -6599,7 +6611,7 @@ xsmp_init(void)
| SmcSaveCompleteProcMask | SmcShutdownCancelledProcMask,
&smcallbacks,
NULL,
- &clientid,
+ &xsmp.clientid,
sizeof(errorstring),
errorstring);
if (xsmp.smcconn == NULL)
@@ -6638,6 +6650,8 @@ xsmp_close()
if (xsmp_icefd != -1)
{
SmcCloseConnection(xsmp.smcconn, 0, NULL);
+ vim_free(xsmp.clientid);
+ xsmp.clientid = NULL;
xsmp_icefd = -1;
}
}
diff --git a/src/version.c b/src/version.c
index 508d8478d..cf910b97b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 318,
+/**/
317,
/**/
316,