… | |
… | |
118 | |
118 | |
119 | delete TermWin.fontset; |
119 | delete TermWin.fontset; |
120 | |
120 | |
121 | if (display) |
121 | if (display) |
122 | { |
122 | { |
|
|
123 | #if defined(MENUBAR) && (MENUBAR_MAX > 1) |
|
|
124 | delete menuBar.drawable; |
|
|
125 | //if (menuBar.win) |
|
|
126 | // XDestroyWindow (display->display, menuBar.win); |
|
|
127 | #endif |
|
|
128 | delete TermWin.drawable; |
|
|
129 | // destroy all windows |
123 | if (TermWin.parent[0]) |
130 | if (TermWin.parent[0]) |
124 | XDestroyWindow (display->display, TermWin.parent[0]); |
131 | XDestroyWindow (display->display, TermWin.parent[0]); |
125 | #if defined(MENUBAR) && (MENUBAR_MAX > 1) |
|
|
126 | if (menuBar.win) |
|
|
127 | XDestroyWindow (display->display, menuBar.win); |
|
|
128 | delete menuBar.drawable; |
|
|
129 | #endif |
|
|
130 | } |
132 | } |
131 | |
133 | |
132 | // TODO: free pixcolours, colours should become part of rxvt_display |
134 | // TODO: free pixcolours, colours should become part of rxvt_display |
133 | |
135 | |
134 | delete PixColors; |
136 | delete PixColors; |
… | |
… | |
737 | } |
739 | } |
738 | else |
740 | else |
739 | { |
741 | { |
740 | rxvt_fontset *fs = new rxvt_fontset (this); |
742 | rxvt_fontset *fs = new rxvt_fontset (this); |
741 | |
743 | |
742 | if (fs && fs->populate (fontname)) |
744 | if (fs && fs->populate (fontname ? fontname : "fixed")) |
743 | { |
745 | { |
744 | delete TermWin.fontset; |
746 | delete TermWin.fontset; |
745 | TermWin.fontset = fs; |
747 | TermWin.fontset = fs; |
746 | TermWin.fwidth = fs->base_font ()->width; |
748 | TermWin.fwidth = fs->base_font ()->width; |
747 | TermWin.fheight = fs->base_font ()->height; |
749 | TermWin.fheight = fs->base_font ()->height; |
748 | TermWin.fbase = fs->base_font ()->ascent; |
750 | TermWin.fbase = fs->base_font ()->ascent; |
749 | |
751 | |
750 | // TODO: screen needs to be told about new fonts |
|
|
751 | |
|
|
752 | if (TermWin.parent[0]) |
752 | if (TermWin.parent[0]) |
753 | { |
753 | { |
754 | resize_all_windows (0, 0, 0); |
754 | resize_all_windows (0, 0, 0); |
755 | scr_remap_chars (); |
755 | scr_remap_chars (); |
756 | scr_touch (true); |
756 | scr_touch (true); |
… | |
… | |
776 | rxvt_term::set_title (const char *str) |
776 | rxvt_term::set_title (const char *str) |
777 | { |
777 | { |
778 | #ifndef SMART_WINDOW_TITLE |
778 | #ifndef SMART_WINDOW_TITLE |
779 | XStoreName (display->display, TermWin.parent[0], str); |
779 | XStoreName (display->display, TermWin.parent[0], str); |
780 | #else |
780 | #else |
781 | char *name; |
781 | char *name; |
782 | |
782 | |
783 | if (XFetchName (display->display, TermWin.parent[0], &name) == 0) |
783 | if (XFetchName (display->display, TermWin.parent[0], &name) == 0) |
784 | name = NULL; |
784 | name = NULL; |
785 | if (name == NULL || STRCMP (name, str)) |
785 | if (name == NULL || STRCMP (name, str)) |
786 | XStoreName (display->display, TermWin.parent[0], str); |
786 | XStoreName (display->display, TermWin.parent[0], str); |
… | |
… | |
793 | rxvt_term::set_iconName (const char *str) |
793 | rxvt_term::set_iconName (const char *str) |
794 | { |
794 | { |
795 | #ifndef SMART_WINDOW_TITLE |
795 | #ifndef SMART_WINDOW_TITLE |
796 | XSetIconName (display->display, TermWin.parent[0], str); |
796 | XSetIconName (display->display, TermWin.parent[0], str); |
797 | #else |
797 | #else |
798 | char *name; |
798 | char *name; |
799 | |
799 | |
800 | if (XGetIconName (display->display, TermWin.parent[0], &name)) |
800 | if (XGetIconName (display->display, TermWin.parent[0], &name)) |
801 | name = NULL; |
801 | name = NULL; |
802 | if (name == NULL || STRCMP (name, str)) |
802 | if (name == NULL || STRCMP (name, str)) |
803 | XSetIconName (display->display, TermWin.parent[0], str); |
803 | XSetIconName (display->display, TermWin.parent[0], str); |
… | |
… | |
808 | |
808 | |
809 | #ifdef XTERM_COLOR_CHANGE |
809 | #ifdef XTERM_COLOR_CHANGE |
810 | void |
810 | void |
811 | rxvt_term::set_window_color (int idx, const char *color) |
811 | rxvt_term::set_window_color (int idx, const char *color) |
812 | { |
812 | { |
813 | rxvt_color xcol; |
813 | rxvt_color xcol; |
814 | int i; |
814 | int i; |
815 | |
815 | |
816 | if (color == NULL || *color == '\0') |
816 | if (color == NULL || *color == '\0') |
817 | return; |
817 | return; |
818 | |
818 | |
819 | /* handle color aliases */ |
819 | /* handle color aliases */ |