diff options
| author | YAMAMOTO Mitsuharu | 2009-06-15 10:50:09 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2009-06-15 10:50:09 +0000 |
| commit | cb5ca9c5436fe6d5f121da9314e9dbff58c59874 (patch) | |
| tree | 742c1f162ab750fa76d69fb7ddee8f2360d267e5 /src | |
| parent | 7841339b76ed0a7410d2af69fd19fc964382b708 (diff) | |
| download | emacs-cb5ca9c5436fe6d5f121da9314e9dbff58c59874.tar.gz emacs-cb5ca9c5436fe6d5f121da9314e9dbff58c59874.zip | |
(x_delete_terminal): Put previous change in #if 0 and
add comment explaining why.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/xterm.c | 14 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index cc5d3d630b0..87784746b9c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-06-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * xterm.c (x_delete_terminal): Put previous change in #if 0 and | ||
| 4 | add comment explaining why. | ||
| 5 | |||
| 1 | 2009-06-14 Sidney Markowitz <sidney@sidney.com> | 6 | 2009-06-14 Sidney Markowitz <sidney@sidney.com> |
| 2 | 7 | ||
| 3 | * nsmenu.m (EmacsTooltip: setText): set height of tooltip. | 8 | * nsmenu.m (EmacsTooltip: setText): set height of tooltip. |
diff --git a/src/xterm.c b/src/xterm.c index 4c516264902..e3d4611523e 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -10747,7 +10747,18 @@ x_delete_terminal (struct terminal *terminal) | |||
| 10747 | /* Whether or not XCloseDisplay destroys the associated resource | 10747 | /* Whether or not XCloseDisplay destroys the associated resource |
| 10748 | database depends on the version of libX11. To avoid both | 10748 | database depends on the version of libX11. To avoid both |
| 10749 | crash and memory leak, we dissociate the database from the | 10749 | crash and memory leak, we dissociate the database from the |
| 10750 | display and then destroy dpyinfo->xrdb ourselves. */ | 10750 | display and then destroy dpyinfo->xrdb ourselves. |
| 10751 | |||
| 10752 | Unfortunately, the above strategy does not work in some | ||
| 10753 | situations due to a bug in newer versions of libX11: because | ||
| 10754 | XrmSetDatabase doesn't clear the flag XlibDisplayDfltRMDB if | ||
| 10755 | dpy->db is NULL, XCloseDisplay destroys the associated | ||
| 10756 | database whereas it has not been created by XGetDefault | ||
| 10757 | (Bug#21974 in freedesktop.org Bugzilla). As a workaround, we | ||
| 10758 | don't destroy the database here in order to avoid the crash | ||
| 10759 | in the above situations for now, though that may cause memory | ||
| 10760 | leaks in other situations. */ | ||
| 10761 | #if 0 | ||
| 10751 | #ifdef HAVE_XRMSETDATABASE | 10762 | #ifdef HAVE_XRMSETDATABASE |
| 10752 | XrmSetDatabase (dpyinfo->display, NULL); | 10763 | XrmSetDatabase (dpyinfo->display, NULL); |
| 10753 | #else | 10764 | #else |
| @@ -10757,6 +10768,7 @@ x_delete_terminal (struct terminal *terminal) | |||
| 10757 | some older versions of libX11 crash if we call it after | 10768 | some older versions of libX11 crash if we call it after |
| 10758 | closing all the displays. */ | 10769 | closing all the displays. */ |
| 10759 | XrmDestroyDatabase (dpyinfo->xrdb); | 10770 | XrmDestroyDatabase (dpyinfo->xrdb); |
| 10771 | #endif | ||
| 10760 | 10772 | ||
| 10761 | #ifdef USE_GTK | 10773 | #ifdef USE_GTK |
| 10762 | xg_display_close (dpyinfo->display); | 10774 | xg_display_close (dpyinfo->display); |