Mirror of the Vim source from https://github.com/vim/vim
Revision | 7d127d580b6d2d86853fc0a322323cdee2eca343 (tree) |
---|---|
Zeit | 2008-06-20 18:59:25 |
Autor | vimboss |
Commiter | vimboss |
updated for version 7.1-318
@@ -1538,8 +1538,11 @@ | ||
1538 | 1538 | attr.depth = DefaultDepthOfScreen(scr); |
1539 | 1539 | |
1540 | 1540 | if (!icon) |
1541 | + { | |
1541 | 1542 | XpmCreatePixmapFromData(dsp, root_window, magick, &icon, |
1542 | 1543 | &icon_mask, &attr); |
1544 | + XpmFreeAttributes(&attr); | |
1545 | + } | |
1543 | 1546 | |
1544 | 1547 | # ifdef FEAT_GUI_ATHENA |
1545 | 1548 | XtVaSetValues(vimShell, XtNiconPixmap, icon, XtNiconMask, icon_mask, NULL); |
@@ -209,6 +209,7 @@ | ||
209 | 209 | { |
210 | 210 | SmcConn smcconn; /* The SM connection ID */ |
211 | 211 | IceConn iceconn; /* The ICE connection ID */ |
212 | + char *clientid; /* The client ID for the current smc session */ | |
212 | 213 | Bool save_yourself; /* If we're in the middle of a save_yourself */ |
213 | 214 | Bool shutdown; /* If we're in shutdown mode */ |
214 | 215 | } xsmp_config_T; |
@@ -2887,16 +2888,28 @@ | ||
2887 | 2888 | if (clip_plus.owned) |
2888 | 2889 | clip_lose_selection(&clip_plus); |
2889 | 2890 | # endif |
2890 | -# if (defined(FEAT_X11) && defined(FEAT_XCLIPBOARD)) || defined(PROTO) | |
2891 | +# if defined(FEAT_X11) && defined(FEAT_XCLIPBOARD) | |
2891 | 2892 | if (xterm_Shell != (Widget)0) |
2892 | 2893 | XtDestroyWidget(xterm_Shell); |
2894 | +# ifndef LESSTIF_VERSION | |
2895 | + /* Lesstif crashes here, lose some memory */ | |
2893 | 2896 | if (xterm_dpy != NULL) |
2894 | 2897 | XtCloseDisplay(xterm_dpy); |
2895 | 2898 | if (app_context != (XtAppContext)NULL) |
2899 | + { | |
2896 | 2900 | XtDestroyApplicationContext(app_context); |
2901 | +# ifdef FEAT_X11 | |
2902 | + x11_display = NULL; /* freed by XtDestroyApplicationContext() */ | |
2903 | +# endif | |
2904 | + } | |
2905 | +# endif | |
2897 | 2906 | # endif |
2898 | 2907 | # ifdef FEAT_X11 |
2899 | - if (x11_display != NULL && x11_display != xterm_dpy) | |
2908 | + if (x11_display != NULL | |
2909 | +# ifdef FEAT_XCLIPBOARD | |
2910 | + && x11_display != xterm_dpy | |
2911 | +# endif | |
2912 | + ) | |
2900 | 2913 | XCloseDisplay(x11_display); |
2901 | 2914 | # endif |
2902 | 2915 | # if defined(HAVE_SIGALTSTACK) || defined(HAVE_SIGSTACK) |
@@ -6290,22 +6303,22 @@ | ||
6290 | 6303 | } |
6291 | 6304 | if (xterm_dpy != NULL) |
6292 | 6305 | { |
6293 | -#if 0 | |
6306 | +# if 0 | |
6294 | 6307 | /* Lesstif and Solaris crash here, lose some memory */ |
6295 | 6308 | XtCloseDisplay(xterm_dpy); |
6296 | -#endif | |
6309 | +# endif | |
6297 | 6310 | if (x11_display == xterm_dpy) |
6298 | 6311 | x11_display = NULL; |
6299 | 6312 | xterm_dpy = NULL; |
6300 | 6313 | } |
6301 | -#if 0 | |
6314 | +# if 0 | |
6302 | 6315 | if (app_context != (XtAppContext)NULL) |
6303 | 6316 | { |
6304 | 6317 | /* Lesstif and Solaris crash here, lose some memory */ |
6305 | 6318 | XtDestroyApplicationContext(app_context); |
6306 | 6319 | app_context = (XtAppContext)NULL; |
6307 | 6320 | } |
6308 | -#endif | |
6321 | +# endif | |
6309 | 6322 | } |
6310 | 6323 | # endif |
6311 | 6324 |
@@ -6557,7 +6570,6 @@ | ||
6557 | 6570 | xsmp_init(void) |
6558 | 6571 | { |
6559 | 6572 | char errorstring[80]; |
6560 | - char *clientid; | |
6561 | 6573 | SmcCallbacks smcallbacks; |
6562 | 6574 | #if 0 |
6563 | 6575 | SmPropValue smname; |
@@ -6599,7 +6611,7 @@ | ||
6599 | 6611 | | SmcSaveCompleteProcMask | SmcShutdownCancelledProcMask, |
6600 | 6612 | &smcallbacks, |
6601 | 6613 | NULL, |
6602 | - &clientid, | |
6614 | + &xsmp.clientid, | |
6603 | 6615 | sizeof(errorstring), |
6604 | 6616 | errorstring); |
6605 | 6617 | if (xsmp.smcconn == NULL) |
@@ -6638,6 +6650,8 @@ | ||
6638 | 6650 | if (xsmp_icefd != -1) |
6639 | 6651 | { |
6640 | 6652 | SmcCloseConnection(xsmp.smcconn, 0, NULL); |
6653 | + vim_free(xsmp.clientid); | |
6654 | + xsmp.clientid = NULL; | |
6641 | 6655 | xsmp_icefd = -1; |
6642 | 6656 | } |
6643 | 6657 | } |
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 318, | |
671 | +/**/ | |
670 | 672 | 317, |
671 | 673 | /**/ |
672 | 674 | 316, |