… | |
… | |
226 | delete fontset[i]; |
226 | delete fontset[i]; |
227 | #endif |
227 | #endif |
228 | delete fontset[0]; |
228 | delete fontset[0]; |
229 | |
229 | |
230 | #ifdef HAVE_BG_PIXMAP |
230 | #ifdef HAVE_BG_PIXMAP |
231 | bgPixmap.destroy (); |
231 | bg_destroy (); |
232 | #endif |
232 | #endif |
233 | #ifdef HAVE_AFTERIMAGE |
233 | #ifdef HAVE_AFTERIMAGE |
234 | if (asv) |
234 | if (asv) |
235 | destroy_asvisual (asv, 0); |
235 | destroy_asvisual (asv, 0); |
236 | if (asimman) |
236 | if (asimman) |
… | |
… | |
956 | void |
956 | void |
957 | rxvt_term::set_colorfgbg () |
957 | rxvt_term::set_colorfgbg () |
958 | { |
958 | { |
959 | unsigned int i; |
959 | unsigned int i; |
960 | const char *xpmb = ""; |
960 | const char *xpmb = ""; |
961 | char fstr[sizeof ("default") + 1], bstr[sizeof ("default") + 1]; |
961 | char fstr[] = "default"; |
|
|
962 | char bstr[] = "default"; |
962 | |
963 | |
963 | strcpy (fstr, "default"); |
|
|
964 | strcpy (bstr, "default"); |
|
|
965 | for (i = Color_Black; i <= Color_White; i++) |
964 | for (i = Color_Black; i <= Color_White; i++) |
966 | if (pix_colors[Color_fg] == pix_colors[i]) |
965 | if (pix_colors[Color_fg] == pix_colors[i]) |
967 | { |
966 | { |
968 | sprintf (fstr, "%d", (i - Color_Black)); |
967 | sprintf (fstr, "%d", i - Color_Black); |
969 | break; |
968 | break; |
970 | } |
969 | } |
971 | |
970 | |
972 | for (i = Color_Black; i <= Color_White; i++) |
971 | for (i = Color_Black; i <= Color_White; i++) |
973 | if (pix_colors[Color_bg] == pix_colors[i]) |
972 | if (pix_colors[Color_bg] == pix_colors[i]) |
974 | { |
973 | { |
975 | sprintf (bstr, "%d", (i - Color_Black)); |
974 | sprintf (bstr, "%d", i - Color_Black); |
976 | #ifdef BG_IMAGE_FROM_FILE |
975 | #ifdef BG_IMAGE_FROM_FILE |
977 | xpmb = "default;"; |
976 | xpmb = "default;"; |
978 | #endif |
977 | #endif |
979 | break; |
978 | break; |
980 | } |
979 | } |
… | |
… | |
1083 | XMoveResizeWindow (dpy, vt, |
1082 | XMoveResizeWindow (dpy, vt, |
1084 | window_vt_x, window_vt_y, |
1083 | window_vt_x, window_vt_y, |
1085 | width, height); |
1084 | width, height); |
1086 | |
1085 | |
1087 | #ifdef HAVE_BG_PIXMAP |
1086 | #ifdef HAVE_BG_PIXMAP |
1088 | if (bgPixmap.window_size_sensitive ()) |
1087 | if (bg_window_size_sensitive ()) |
1089 | update_background (); |
1088 | update_background (); |
1090 | #endif |
1089 | #endif |
1091 | } |
1090 | } |
1092 | |
1091 | |
1093 | if (fix_screen || old_height == 0) |
1092 | if (fix_screen || old_height == 0) |
1094 | scr_reset (); |
1093 | scr_reset (); |
1095 | |
|
|
1096 | #ifdef HAVE_BG_PIXMAP |
|
|
1097 | // TODO: this don't seem to have any effect - do we still need it ? If so - in which case exactly ? |
|
|
1098 | // if (bgPixmap.pixmap) |
|
|
1099 | // scr_touch (false); |
|
|
1100 | #endif |
|
|
1101 | |
1094 | |
1102 | #ifdef USE_XIM |
1095 | #ifdef USE_XIM |
1103 | IMSetPosition (); |
1096 | IMSetPosition (); |
1104 | #endif |
1097 | #endif |
1105 | } |
1098 | } |
… | |
… | |
1354 | p = pet[pi]; |
1347 | p = pet[pi]; |
1355 | |
1348 | |
1356 | if (!p) |
1349 | if (!p) |
1357 | continue; |
1350 | continue; |
1358 | |
1351 | |
1359 | s = rxvt_splitcommastring (p); |
1352 | s = rxvt_strsplit (',', p); |
1360 | |
1353 | |
1361 | for (i = found = 0; !found && s[i]; i++) |
1354 | for (i = found = 0; !found && s[i]; i++) |
1362 | { |
1355 | { |
1363 | if (!strcmp (s[i], "OverTheSpot")) |
1356 | if (!strcmp (s[i], "OverTheSpot")) |
1364 | input_style = XIMPreeditPosition | XIMStatusNothing; |
1357 | input_style = XIMPreeditPosition | XIMStatusNothing; |
… | |
… | |
1376 | input_style = XIMPreeditNothing | XIMStatusNothing; |
1369 | input_style = XIMPreeditNothing | XIMStatusNothing; |
1377 | |
1370 | |
1378 | for (j = 0; j < xim_styles->count_styles; j++) |
1371 | for (j = 0; j < xim_styles->count_styles; j++) |
1379 | if (input_style == xim_styles->supported_styles[j]) |
1372 | if (input_style == xim_styles->supported_styles[j]) |
1380 | { |
1373 | { |
1381 | rxvt_freecommastring (s); |
1374 | rxvt_free_strsplit (s); |
1382 | |
1375 | |
1383 | found = 1; |
1376 | found = 1; |
1384 | goto foundpet; |
1377 | goto foundpet; |
1385 | } |
1378 | } |
1386 | |
1379 | |
1387 | } |
1380 | } |
1388 | |
1381 | |
1389 | rxvt_freecommastring (s); |
1382 | rxvt_free_strsplit (s); |
1390 | } |
1383 | } |
1391 | |
1384 | |
1392 | foundpet: |
1385 | foundpet: |
1393 | |
1386 | |
1394 | XFree (xim_styles); |
1387 | XFree (xim_styles); |
… | |
… | |
1550 | p = rs[Rs_inputMethod]; |
1543 | p = rs[Rs_inputMethod]; |
1551 | if (p && *p) |
1544 | if (p && *p) |
1552 | { |
1545 | { |
1553 | bool found = false; |
1546 | bool found = false; |
1554 | |
1547 | |
1555 | s = rxvt_splitcommastring (p); |
1548 | s = rxvt_strsplit (',', p); |
1556 | |
1549 | |
1557 | for (i = 0; s[i]; i++) |
1550 | for (i = 0; s[i]; i++) |
1558 | { |
1551 | { |
1559 | if (*s[i]) |
1552 | if (*s[i]) |
1560 | { |
1553 | { |
… | |
… | |
1566 | break; |
1559 | break; |
1567 | } |
1560 | } |
1568 | } |
1561 | } |
1569 | } |
1562 | } |
1570 | |
1563 | |
1571 | rxvt_freecommastring (s); |
1564 | rxvt_free_strsplit (s); |
1572 | |
1565 | |
1573 | if (found) |
1566 | if (found) |
1574 | goto done; |
1567 | goto done; |
1575 | } |
1568 | } |
1576 | |
1569 | |
… | |
… | |
1669 | rxvt_term::update_background () |
1662 | rxvt_term::update_background () |
1670 | { |
1663 | { |
1671 | if (update_background_ev.is_active ()) |
1664 | if (update_background_ev.is_active ()) |
1672 | return; |
1665 | return; |
1673 | |
1666 | |
1674 | bgPixmap.invalidate (); |
1667 | bg_invalidate (); |
1675 | |
1668 | |
1676 | ev_tstamp to_wait = 0.5 - (ev::now () - bgPixmap.valid_since); |
1669 | ev_tstamp to_wait = 0.5 - (ev::now () - bg_valid_since); |
1677 | |
1670 | |
1678 | if (to_wait <= 0.) |
1671 | if (to_wait <= 0.) |
1679 | bgPixmap.render (); |
1672 | bg_render (); |
1680 | else |
1673 | else |
1681 | update_background_ev.start (to_wait); |
1674 | update_background_ev.start (to_wait); |
1682 | } |
1675 | } |
1683 | |
1676 | |
1684 | void |
1677 | void |
1685 | rxvt_term::update_background_cb (ev::timer &w, int revents) |
1678 | rxvt_term::update_background_cb (ev::timer &w, int revents) |
1686 | { |
1679 | { |
1687 | make_current (); |
1680 | make_current (); |
1688 | |
1681 | |
1689 | update_background_ev.stop (); |
1682 | update_background_ev.stop (); |
1690 | bgPixmap.render (); |
1683 | bg_render (); |
1691 | refresh_check (); |
1684 | refresh_check (); |
1692 | } |
1685 | } |
1693 | |
1686 | |
1694 | #endif /* HAVE_BG_PIXMAP */ |
1687 | #endif /* HAVE_BG_PIXMAP */ |
1695 | |
1688 | |