… | |
… | |
252 | //if (menuBar.win) |
252 | //if (menuBar.win) |
253 | // XDestroyWindow (disp, menuBar.win); |
253 | // XDestroyWindow (disp, menuBar.win); |
254 | #endif |
254 | #endif |
255 | delete TermWin.drawable; |
255 | delete TermWin.drawable; |
256 | // destroy all windows |
256 | // destroy all windows |
257 | if (TermWin.parent[0] |
257 | if (TermWin.parent[0]) |
258 | #if ENABLE_FRILLS |
|
|
259 | && !rs[Rs_embed] |
|
|
260 | #endif |
|
|
261 | ) |
|
|
262 | XDestroyWindow (disp, TermWin.parent[0]); |
258 | XDestroyWindow (disp, TermWin.parent[0]); |
263 | } |
259 | } |
264 | |
260 | |
265 | // TODO: free pixcolours, colours should become part of rxvt_display |
261 | // TODO: free pixcolours, colours should become part of rxvt_display |
266 | |
262 | |
267 | delete pix_colors_focused; |
263 | delete pix_colors_focused; |
268 | #ifdef OFF_FOCUS_FADING |
264 | #if OFF_FOCUS_FADING |
269 | delete pix_colors_unfocused; |
265 | delete pix_colors_unfocused; |
270 | #endif |
266 | #endif |
271 | |
267 | |
272 | displays.put (display); |
268 | displays.put (display); |
273 | |
269 | |
… | |
… | |
421 | { |
417 | { |
422 | if (GET_R->allowedxerror == -1) |
418 | if (GET_R->allowedxerror == -1) |
423 | GET_R->allowedxerror = event->error_code; |
419 | GET_R->allowedxerror = event->error_code; |
424 | else |
420 | else |
425 | { |
421 | { |
426 | //TODO: GET_R is most likely not the terminal which caused the error |
422 | // GET_R is most likely not the terminal which caused the error, |
427 | //TODO: maybe just output the error and continue? |
423 | // so just output the error and continue |
428 | #if ENABLE_FRILLS |
424 | #if ENABLE_FRILLS |
429 | print_x_error (display, event); |
425 | print_x_error (display, event); |
430 | #else |
426 | #else |
431 | old_xerror_handler (display, event); |
427 | old_xerror_handler (display, event); |
432 | #endif |
428 | #endif |
… | |
… | |
959 | /* xterm sequences - title, iconName, color (exptl) */ |
955 | /* xterm sequences - title, iconName, color (exptl) */ |
960 | void |
956 | void |
961 | rxvt_term::set_title (const char *str) |
957 | rxvt_term::set_title (const char *str) |
962 | { |
958 | { |
963 | set_string_property (XA_WM_NAME, str); |
959 | set_string_property (XA_WM_NAME, str); |
964 | #if ENABLE_FRILLS |
960 | #if ENABLE_EWMH |
965 | set_utf8_property (xa[XA_NET_WM_NAME], str); |
961 | set_utf8_property (xa[XA_NET_WM_NAME], str); |
966 | #endif |
962 | #endif |
967 | } |
963 | } |
968 | |
964 | |
969 | void |
965 | void |
970 | rxvt_term::set_icon_name (const char *str) |
966 | rxvt_term::set_icon_name (const char *str) |
971 | { |
967 | { |
972 | set_string_property (XA_WM_ICON_NAME, str); |
968 | set_string_property (XA_WM_ICON_NAME, str); |
973 | #if ENABLE_FRILLS |
969 | #if ENABLE_EWMH |
974 | set_utf8_property (xa[XA_NET_WM_ICON_NAME], str); |
970 | set_utf8_property (xa[XA_NET_WM_ICON_NAME], str); |
975 | #endif |
971 | #endif |
976 | } |
972 | } |
977 | |
973 | |
978 | #ifdef XTERM_COLOR_CHANGE |
974 | #ifdef XTERM_COLOR_CHANGE |
… | |
… | |
994 | { /* bright colors */ |
990 | { /* bright colors */ |
995 | i -= 8; |
991 | i -= 8; |
996 | # ifndef NO_BRIGHTCOLOR |
992 | # ifndef NO_BRIGHTCOLOR |
997 | pix_colors_focused[idx] = pix_colors_focused[minBrightCOLOR + i]; |
993 | pix_colors_focused[idx] = pix_colors_focused[minBrightCOLOR + i]; |
998 | SET_PIXCOLOR (idx); |
994 | SET_PIXCOLOR (idx); |
999 | goto Done; |
995 | goto done; |
1000 | # endif |
996 | # endif |
1001 | } |
997 | } |
1002 | |
998 | |
1003 | if (i >= 0 && i <= 7) |
999 | if (i >= 0 && i <= 7) |
1004 | { /* normal colors */ |
1000 | { /* normal colors */ |
1005 | pix_colors_focused[idx] = pix_colors_focused[minCOLOR + i]; |
1001 | pix_colors_focused[idx] = pix_colors_focused[minCOLOR + i]; |
1006 | SET_PIXCOLOR (idx); |
1002 | SET_PIXCOLOR (idx); |
1007 | goto Done; |
1003 | goto done; |
1008 | } |
1004 | } |
1009 | } |
1005 | } |
1010 | |
1006 | |
1011 | if (!rXParseAllocColor (&xcol, color)) |
1007 | if (!rXParseAllocColor (&xcol, color)) |
1012 | return; |
1008 | return; |
… | |
… | |
1032 | pix_colors_focused[idx] = xcol; |
1028 | pix_colors_focused[idx] = xcol; |
1033 | SET_PIXCOLOR (idx); |
1029 | SET_PIXCOLOR (idx); |
1034 | |
1030 | |
1035 | /* XSetWindowAttributes attr; */ |
1031 | /* XSetWindowAttributes attr; */ |
1036 | /* Cursor cursor; */ |
1032 | /* Cursor cursor; */ |
1037 | Done: |
1033 | done: |
|
|
1034 | |
1038 | #ifdef OFF_FOCUS_FADING |
1035 | #if OFF_FOCUS_FADING |
1039 | if (rs[Rs_fade]) |
1036 | if (rs[Rs_fade]) |
1040 | pix_colors_unfocused[idx] = pix_colors_focused[idx].fade (display, atoi (rs[Rs_fade])); |
1037 | pix_colors_unfocused[idx] = pix_colors_focused[idx].fade (display, atoi (rs[Rs_fade]), pix_colors[Color_fade]); |
1041 | #endif |
1038 | #endif |
1042 | |
1039 | |
1043 | /*TODO: handle Color_BD, scrollbar background, etc. */ |
1040 | /*TODO: handle Color_BD, scrollbar background, etc. */ |
1044 | |
1041 | |
1045 | recolour_cursor (); |
1042 | recolour_cursor (); |
… | |
… | |
1250 | XWindowAttributes wattr; |
1247 | XWindowAttributes wattr; |
1251 | |
1248 | |
1252 | if (width == 0 || height == 0) |
1249 | if (width == 0 || height == 0) |
1253 | { |
1250 | { |
1254 | XGetWindowAttributes (display->display, display->root, &wattr); |
1251 | XGetWindowAttributes (display->display, display->root, &wattr); |
|
|
1252 | |
1255 | if (width == 0) |
1253 | if (width == 0) |
1256 | width = wattr.width - szHint.base_width; |
1254 | width = wattr.width - szHint.base_width; |
1257 | if (height == 0) |
1255 | if (height == 0) |
1258 | height = wattr.height - szHint.base_height; |
1256 | height = wattr.height - szHint.base_height; |
1259 | } |
1257 | } |