aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2007-06-02 04:01:51 +0000
committerChong Yidong2007-06-02 04:01:51 +0000
commita3dcc98fea1a386b8fe337cf97b8f08562c9950a (patch)
treeefe56666dcb3d609d110d86a0bc6192ed820b6c1
parent2c5e0a1041e0748205ae833411457f37f2c5eaaf (diff)
downloademacs-a3dcc98fea1a386b8fe337cf97b8f08562c9950a.tar.gz
emacs-a3dcc98fea1a386b8fe337cf97b8f08562c9950a.zip
(x_set_name_internal): Undo last change.
-rw-r--r--src/xfns.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/xfns.c b/src/xfns.c
index ae8ef659728..d269dfbd37f 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1607,20 +1607,22 @@ x_set_name_internal (f, name)
1607 BLOCK_INPUT; 1607 BLOCK_INPUT;
1608#ifdef HAVE_X11R4 1608#ifdef HAVE_X11R4
1609 { 1609 {
1610 XTextProperty text, icon;
1611 int bytes, stringp;
1612 int do_free_icon_value = 0, do_free_text_value = 0;
1613 Lisp_Object coding_system;
1610#ifdef USE_GTK 1614#ifdef USE_GTK
1611 Lisp_Object encoded_name; 1615 Lisp_Object encoded_name;
1616 struct gcpro gcpro1;
1612 1617
1618 /* As ENCODE_UTF_8 may cause GC and relocation of string data,
1619 we use it before x_encode_text that may return string data. */
1620 GCPRO1 (name);
1613 encoded_name = ENCODE_UTF_8 (name); 1621 encoded_name = ENCODE_UTF_8 (name);
1622 UNGCPRO;
1623#endif
1614 1624
1615 gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
1616 (char *) SDATA (encoded_name));
1617#else /* not USE_GTK */
1618 XTextProperty text, icon;
1619 int bytes, stringp;
1620 int do_free_icon_value = 0, do_free_text_value = 0;
1621 Lisp_Object coding_system;
1622 coding_system = Qcompound_text; 1625 coding_system = Qcompound_text;
1623
1624 /* Note: Encoding strategy 1626 /* Note: Encoding strategy
1625 1627
1626 We encode NAME by compound-text and use "COMPOUND-TEXT" in 1628 We encode NAME by compound-text and use "COMPOUND-TEXT" in
@@ -1657,7 +1659,12 @@ x_set_name_internal (f, name)
1657 icon.nitems = bytes; 1659 icon.nitems = bytes;
1658 } 1660 }
1659 1661
1662#ifdef USE_GTK
1663 gtk_window_set_title (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
1664 (char *) SDATA (encoded_name));
1665#else /* not USE_GTK */
1660 XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text); 1666 XSetWMName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
1667#endif /* not USE_GTK */
1661 1668
1662 XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &icon); 1669 XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &icon);
1663 1670
@@ -1665,7 +1672,6 @@ x_set_name_internal (f, name)
1665 xfree (icon.value); 1672 xfree (icon.value);
1666 if (do_free_text_value) 1673 if (do_free_text_value)
1667 xfree (text.value); 1674 xfree (text.value);
1668#endif /* not USE_GTK */
1669 } 1675 }
1670#else /* not HAVE_X11R4 */ 1676#else /* not HAVE_X11R4 */
1671 XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 1677 XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),