… | |
… | |
93 | class rxvt_composite_vec rxvt_composite; |
93 | class rxvt_composite_vec rxvt_composite; |
94 | |
94 | |
95 | text_t rxvt_composite_vec::compose (unicode_t c1, unicode_t c2) |
95 | text_t rxvt_composite_vec::compose (unicode_t c1, unicode_t c2) |
96 | { |
96 | { |
97 | compose_char *cc; |
97 | compose_char *cc; |
98 | |
98 | |
99 | // break compose chains, as stupid readline really likes to duplicate |
99 | // break compose chains, as stupid readline really likes to duplicate |
100 | // composing characters for some reason near the end of a line. |
100 | // composing characters for some reason near the end of a line. |
101 | cc = (*this)[c1]; |
101 | cc = (*this)[c1]; |
102 | while (cc) |
102 | while (cc) |
103 | { |
103 | { |
… | |
… | |
183 | pointer_ev (this, &rxvt_term::pointer_cb), |
183 | pointer_ev (this, &rxvt_term::pointer_cb), |
184 | #endif |
184 | #endif |
185 | #ifdef USE_XIM |
185 | #ifdef USE_XIM |
186 | im_ev (this, &rxvt_term::im_cb), |
186 | im_ev (this, &rxvt_term::im_cb), |
187 | #endif |
187 | #endif |
188 | #ifndef NO_BELL |
188 | #ifndef NO_BELL |
189 | bell_ev (this, &rxvt_term::bell_cb), |
189 | bell_ev (this, &rxvt_term::bell_cb), |
190 | #endif |
190 | #endif |
191 | termwin_ev (this, &rxvt_term::x_cb), |
191 | termwin_ev (this, &rxvt_term::x_cb), |
192 | vt_ev (this, &rxvt_term::x_cb), |
192 | vt_ev (this, &rxvt_term::x_cb), |
193 | child_ev (this, &rxvt_term::child_cb), |
193 | child_ev (this, &rxvt_term::child_cb), |
… | |
… | |
434 | else |
434 | else |
435 | XGetErrorDatabaseText(dpy, mtype, "ResourceID", "ResourceID 0x%x", |
435 | XGetErrorDatabaseText(dpy, mtype, "ResourceID", "ResourceID 0x%x", |
436 | mesg, BUFSIZ); |
436 | mesg, BUFSIZ); |
437 | rxvt_warn (strncat (mesg, "\n", BUFSIZ), event->resourceid); |
437 | rxvt_warn (strncat (mesg, "\n", BUFSIZ), event->resourceid); |
438 | } |
438 | } |
439 | XGetErrorDatabaseText(dpy, mtype, "ErrorSerial", "Error Serial #%d", |
439 | XGetErrorDatabaseText(dpy, mtype, "ErrorSerial", "Error Serial #%d", |
440 | mesg, BUFSIZ); |
440 | mesg, BUFSIZ); |
441 | rxvt_warn (strncat (mesg, "\n", BUFSIZ), event->serial); |
441 | rxvt_warn (strncat (mesg, "\n", BUFSIZ), event->serial); |
442 | } |
442 | } |
443 | #endif |
443 | #endif |
444 | |
444 | |
… | |
… | |
518 | |
518 | |
519 | #ifdef ENABLE_TRANSPARENCY |
519 | #ifdef ENABLE_TRANSPARENCY |
520 | if (option (Opt_transparent)) |
520 | if (option (Opt_transparent)) |
521 | { |
521 | { |
522 | bgPixmap.set_transparent (); |
522 | bgPixmap.set_transparent (); |
523 | #ifdef HAVE_AFTERIMAGE |
523 | #ifdef HAVE_AFTERIMAGE |
524 | if (rs [Rs_blurradius]) |
524 | if (rs [Rs_blurradius]) |
525 | bgPixmap.set_blur_radius (rs [Rs_blurradius]); |
525 | bgPixmap.set_blur_radius (rs [Rs_blurradius]); |
526 | #endif |
526 | #endif |
527 | if (ISSET_PIXCOLOR (Color_tint)) |
527 | if (ISSET_PIXCOLOR (Color_tint)) |
528 | bgPixmap.set_tint (pix_colors_focused [Color_tint]); |
528 | bgPixmap.set_tint (pix_colors_focused [Color_tint]); |
529 | if (rs [Rs_shade]) |
529 | if (rs [Rs_shade]) |
530 | bgPixmap.set_shade (rs [Rs_shade]); |
530 | bgPixmap.set_shade (rs [Rs_shade]); |
531 | |
531 | |
… | |
… | |
590 | } |
590 | } |
591 | |
591 | |
592 | static struct sig_handlers |
592 | static struct sig_handlers |
593 | { |
593 | { |
594 | sig_watcher sw_term, sw_int; |
594 | sig_watcher sw_term, sw_int; |
595 | |
595 | |
596 | /* |
596 | /* |
597 | * Catch a fatal signal and tidy up before quitting |
597 | * Catch a fatal signal and tidy up before quitting |
598 | */ |
598 | */ |
599 | void |
599 | void |
600 | sig_term (sig_watcher &w) |
600 | sig_term (sig_watcher &w) |
… | |
… | |
902 | if (parent[0]) |
902 | if (parent[0]) |
903 | { |
903 | { |
904 | resize_all_windows (0, 0, 0); |
904 | resize_all_windows (0, 0, 0); |
905 | scr_remap_chars (); |
905 | scr_remap_chars (); |
906 | scr_touch (true); |
906 | scr_touch (true); |
907 | } |
907 | } |
908 | |
908 | |
909 | return true; |
909 | return true; |
910 | } |
910 | } |
911 | |
911 | |
912 | void |
912 | void |
… | |
… | |
956 | rxvt_term::set_window_color (int idx, const char *color) |
956 | rxvt_term::set_window_color (int idx, const char *color) |
957 | { |
957 | { |
958 | #ifdef XTERM_COLOR_CHANGE |
958 | #ifdef XTERM_COLOR_CHANGE |
959 | rxvt_color xcol; |
959 | rxvt_color xcol; |
960 | int i; |
960 | int i; |
961 | |
961 | |
962 | if (color == NULL || *color == '\0') |
962 | if (color == NULL || *color == '\0') |
963 | return; |
963 | return; |
964 | |
964 | |
965 | color = strdup (color); |
965 | color = strdup (color); |
966 | allocated.push_back ((void *)color); |
966 | allocated.push_back ((void *)color); |
… | |
… | |
1347 | if (term->rs[Rs_imLocale]) |
1347 | if (term->rs[Rs_imLocale]) |
1348 | SET_LOCALE (term->locale); |
1348 | SET_LOCALE (term->locale); |
1349 | } |
1349 | } |
1350 | else |
1350 | else |
1351 | str = (void *)text->string.wide_char; |
1351 | str = (void *)text->string.wide_char; |
1352 | |
1352 | |
1353 | HOOK_INVOKE ((term, HOOK_XIM_PREEDIT_DRAW, |
1353 | HOOK_INVOKE ((term, HOOK_XIM_PREEDIT_DRAW, |
1354 | DT_INT, call_data->caret, |
1354 | DT_INT, call_data->caret, |
1355 | DT_INT, call_data->chg_first, |
1355 | DT_INT, call_data->chg_first, |
1356 | DT_INT, call_data->chg_length, |
1356 | DT_INT, call_data->chg_length, |
1357 | DT_LCS_LEN, (void *)text->feedback, text->feedback ? (int)text->length : 0, |
1357 | DT_LCS_LEN, (void *)text->feedback, text->feedback ? (int)text->length : 0, |
… | |
… | |
1676 | |
1676 | |
1677 | if (input_style & XIMPreeditPosition) |
1677 | if (input_style & XIMPreeditPosition) |
1678 | { |
1678 | { |
1679 | im_set_size (preedit_rect); |
1679 | im_set_size (preedit_rect); |
1680 | preedit_attr = XVaCreateNestedList (0, XNArea, &preedit_rect, NULL); |
1680 | preedit_attr = XVaCreateNestedList (0, XNArea, &preedit_rect, NULL); |
1681 | |
1681 | |
1682 | XSetICValues (Input_Context, |
1682 | XSetICValues (Input_Context, |
1683 | XNPreeditAttributes, preedit_attr, NULL); |
1683 | XNPreeditAttributes, preedit_attr, NULL); |
1684 | } |
1684 | } |
1685 | else |
1685 | else |
1686 | { |
1686 | { |