… | |
… | |
95 | XK_Shift_L, 0x21e7, |
95 | XK_Shift_L, 0x21e7, |
96 | XK_Shift_R, 0x21e7, |
96 | XK_Shift_R, 0x21e7, |
97 | |
97 | |
98 | XK_Shift_Lock, 0x21eb, |
98 | XK_Shift_Lock, 0x21eb, |
99 | XK_ISO_Lock, 0x21eb, |
99 | XK_ISO_Lock, 0x21eb, |
100 | XK_ISO_Lock, 0x21eb, |
|
|
101 | XK_Caps_Lock, 0x21ec, |
100 | XK_Caps_Lock, 0x21ec, |
102 | XK_Num_Lock, 0x21ed, |
101 | XK_Num_Lock, 0x21ed, |
103 | XK_ISO_Level3_Shift, 0x21ee, |
102 | XK_ISO_Level3_Shift, 0x21ee, |
104 | XK_ISO_Level3_Lock, 0x21ef, |
103 | XK_ISO_Level3_Lock, 0x21ef, |
105 | XK_ISO_Group_Lock, 0x21f0, |
104 | XK_ISO_Group_Lock, 0x21f0, |
… | |
… | |
500 | # if ISO_14755 |
499 | # if ISO_14755 |
501 | iso14755_51 (0); |
500 | iso14755_51 (0); |
502 | # endif |
501 | # endif |
503 | return; |
502 | return; |
504 | } |
503 | } |
|
|
504 | else if (keysym == XK_BackSpace) |
|
|
505 | { |
|
|
506 | iso14755buf = ((iso14755buf & ISO_14755_MASK) >> 4) | ISO_14755_51; |
|
|
507 | # if ISO_14755 |
|
|
508 | iso14755_51 (iso14755buf & ISO_14755_MASK); |
|
|
509 | # endif |
|
|
510 | return; |
|
|
511 | } |
505 | else if ((hv = hex_keyval (ev)) >= 0) |
512 | else if ((hv = hex_keyval (ev)) >= 0) |
506 | { |
513 | { |
507 | iso14755buf = ((iso14755buf << 4) & ISO_14755_MASK) |
514 | iso14755buf = ((iso14755buf << 4) & ISO_14755_MASK) |
508 | | hv | ISO_14755_51; |
515 | | hv | ISO_14755_51; |
509 | # if ISO_14755 |
516 | # if ISO_14755 |
… | |
… | |
511 | # endif |
518 | # endif |
512 | return; |
519 | return; |
513 | } |
520 | } |
514 | else |
521 | else |
515 | { |
522 | { |
516 | # if ENABLE_OVERLAY |
523 | # if ISO_14755 |
517 | scr_overlay_off (); |
524 | scr_overlay_off (); |
518 | # endif |
525 | # endif |
519 | iso14755buf = 0; |
526 | iso14755buf = 0; |
520 | } |
527 | } |
521 | } |
528 | } |
522 | else if ((ctrl && (keysym == XK_Shift_L || keysym == XK_Shift_R)) |
529 | else if ((ctrl && (keysym == XK_Shift_L || keysym == XK_Shift_R)) |
523 | || (shft && (keysym == XK_Control_L || keysym == XK_Control_R))) |
530 | || (shft && (keysym == XK_Control_L || keysym == XK_Control_R))) |
524 | if (!(iso14755buf & ISO_14755_STARTED)) |
531 | if (!(iso14755buf & ISO_14755_STARTED)) |
525 | { |
532 | { |
526 | iso14755buf |= ISO_14755_STARTED; |
533 | iso14755buf |= ISO_14755_STARTED; |
527 | # if ENABLE_OVERLAY |
534 | # if ISO_14755 |
528 | scr_overlay_new (0, -1, sizeof ("ISO 14755 mode") - 1, 1); |
535 | scr_overlay_new (0, -1, sizeof ("ISO 14755 mode") - 1, 1); |
529 | scr_overlay_set (0, 0, "ISO 14755 mode"); |
536 | scr_overlay_set (0, 0, "ISO 14755 mode"); |
530 | # endif |
537 | # endif |
531 | } |
538 | } |
532 | #endif |
539 | #endif |
533 | |
540 | |
534 | #ifdef PRINTPIPE |
541 | #ifdef PRINTPIPE |
535 | if (keysym == XK_Print) |
542 | if (keysym == XK_Print) |
536 | { |
543 | { |
537 | scr_printscreen (ctrl | shft); |
544 | scr_printscreen (ctrl | shft); |
538 | return; |
545 | return; |
… | |
… | |
720 | |
727 | |
721 | case XK_Find: |
728 | case XK_Find: |
722 | strcpy (kbuf, "\033[1~"); |
729 | strcpy (kbuf, "\033[1~"); |
723 | break; |
730 | break; |
724 | |
731 | |
725 | #ifdef XK_KP_End |
732 | #ifdef XK_KP_Insert |
726 | case XK_KP_Insert: |
733 | case XK_KP_Insert: |
727 | /* allow shift to override */ |
734 | /* allow shift to override */ |
728 | if ((priv_modes & PrivMode_aplKP) ? !shft : shft) |
735 | if ((priv_modes & PrivMode_aplKP) ? !shft : shft) |
729 | { |
736 | { |
730 | strcpy (kbuf, "\033Op"); |
737 | strcpy (kbuf, "\033Op"); |
… | |
… | |
877 | return; |
884 | return; |
878 | |
885 | |
879 | if (len <= 0) |
886 | if (len <= 0) |
880 | return; /* not mapped */ |
887 | return; /* not mapped */ |
881 | |
888 | |
882 | if (OPTION (Opt_scrollTtyKeypress)) |
889 | if (option (Opt_scrollTtyKeypress)) |
883 | if (view_start) |
890 | if (view_start) |
884 | { |
891 | { |
885 | view_start = 0; |
892 | view_start = 0; |
886 | want_refresh = 1; |
893 | want_refresh = 1; |
887 | } |
894 | } |
… | |
… | |
926 | #if ENABLE_FRILLS || ISO_14755 |
933 | #if ENABLE_FRILLS || ISO_14755 |
927 | // ISO 14755 support |
934 | // ISO 14755 support |
928 | if (iso14755buf) |
935 | if (iso14755buf) |
929 | if (iso14755buf & ISO_14755_52) |
936 | if (iso14755buf & ISO_14755_52) |
930 | { |
937 | { |
931 | # if ENABLE_OVERLAY |
938 | # if ISO_14755 |
932 | scr_overlay_off (); |
939 | scr_overlay_off (); |
933 | # endif |
940 | # endif |
934 | # if ISO_14755 |
941 | # if ISO_14755 |
935 | // iso14755 part 5.2 handling: release time |
942 | // iso14755 part 5.2 handling: release time |
936 | // first: controls |
943 | // first: controls |
… | |
… | |
959 | |
966 | |
960 | return; |
967 | return; |
961 | } |
968 | } |
962 | else if ((ev.state & (ShiftMask | ControlMask)) != (ShiftMask | ControlMask)) |
969 | else if ((ev.state & (ShiftMask | ControlMask)) != (ShiftMask | ControlMask)) |
963 | { |
970 | { |
964 | # if ENABLE_OVERLAY |
971 | # if ISO_14755 |
965 | scr_overlay_off (); |
972 | scr_overlay_off (); |
966 | # endif |
973 | # endif |
967 | if (iso14755buf & ISO_14755_51) |
974 | if (iso14755buf & ISO_14755_51) |
968 | commit_iso14755 (); |
975 | commit_iso14755 (); |
969 | #if ISO_14755 |
976 | #if ISO_14755 |
970 | else if (iso14755buf & ISO_14755_STARTED) |
977 | else if (option (Opt_iso14755_52) && iso14755buf & ISO_14755_STARTED) |
971 | { |
978 | { |
972 | iso14755buf = ISO_14755_52; // iso14755 part 5.2: remember empty begin/end pair |
979 | iso14755buf = ISO_14755_52; // iso14755 part 5.2: remember empty begin/end pair |
973 | |
980 | |
974 | scr_overlay_new (0, -1, sizeof ("KEYCAP PICTURE INSERT MODE") - 1, 1); |
981 | scr_overlay_new (0, -1, sizeof ("KEYCAP PICTURE INSERT MODE") - 1, 1); |
975 | scr_overlay_set (0, 0, "KEYCAP PICTURE INSERT MODE"); |
982 | scr_overlay_set (0, 0, "KEYCAP PICTURE INSERT MODE"); |
… | |
… | |
1027 | void |
1034 | void |
1028 | rxvt_term::flush () |
1035 | rxvt_term::flush () |
1029 | { |
1036 | { |
1030 | flush_ev.stop (); |
1037 | flush_ev.stop (); |
1031 | |
1038 | |
1032 | #ifdef TRANSPARENT |
1039 | #ifdef ENABLE_TRANSPARENCY |
1033 | if (want_full_refresh) |
1040 | if (want_full_refresh) |
1034 | { |
1041 | { |
1035 | want_full_refresh = 0; |
1042 | want_full_refresh = 0; |
1036 | scr_clear (); |
1043 | scr_clear (); |
1037 | scr_touch (false); |
1044 | scr_touch (false); |
… | |
… | |
1102 | void |
1109 | void |
1103 | rxvt_term::flush_cb (time_watcher &w) |
1110 | rxvt_term::flush_cb (time_watcher &w) |
1104 | { |
1111 | { |
1105 | make_current (); |
1112 | make_current (); |
1106 | |
1113 | |
1107 | refresh_limit = 1; |
|
|
1108 | refresh_count = 0; |
1114 | refresh_count = 0; |
1109 | flush (); |
1115 | flush (); |
1110 | } |
1116 | } |
1111 | |
1117 | |
1112 | #ifdef CURSOR_BLINK |
1118 | #ifdef CURSOR_BLINK |
… | |
… | |
1178 | |
1184 | |
1179 | #if LINUX_YIELD_HACK |
1185 | #if LINUX_YIELD_HACK |
1180 | static struct event_handler |
1186 | static struct event_handler |
1181 | { |
1187 | { |
1182 | check_watcher yield_ev; |
1188 | check_watcher yield_ev; |
1183 | |
1189 | |
1184 | void yield_cb (check_watcher &w) |
1190 | void yield_cb (check_watcher &w) |
1185 | { |
1191 | { |
1186 | // this should really be sched_yield(), but the linux guys thought |
1192 | // this should really be sched_yield(), but the linux guys thought |
1187 | // that giving a process calling sched_yield () less cpu time than |
1193 | // that giving a process calling sched_yield () less cpu time than |
1188 | // ones with high nice levels is a useful thing to do. It surely is is |
1194 | // ones with high nice levels is a useful thing to do. It surely is is |
… | |
… | |
1232 | } |
1238 | } |
1233 | else |
1239 | else |
1234 | { |
1240 | { |
1235 | pty_ev.stop (); |
1241 | pty_ev.stop (); |
1236 | |
1242 | |
1237 | if (!OPTION (Opt_hold)) |
1243 | if (!option (Opt_hold)) |
1238 | destroy (); |
1244 | destroy (); |
1239 | } |
1245 | } |
1240 | |
1246 | |
1241 | return false; |
1247 | return false; |
1242 | } |
1248 | } |
1243 | |
1249 | |
1244 | void |
1250 | void |
1245 | rxvt_term::pty_cb (io_watcher &w, short revents) |
1251 | rxvt_term::pty_cb (io_watcher &w, short revents) |
… | |
… | |
1263 | recolour_cursor (); |
1269 | recolour_cursor (); |
1264 | |
1270 | |
1265 | #ifdef POINTER_BLANK |
1271 | #ifdef POINTER_BLANK |
1266 | hidden_pointer = 0; |
1272 | hidden_pointer = 0; |
1267 | |
1273 | |
1268 | if (OPTION (Opt_pointerBlank)) |
1274 | if (option (Opt_pointerBlank)) |
1269 | pointer_ev.start (NOW + pointerBlankDelay); |
1275 | pointer_ev.start (NOW + pointerBlankDelay); |
1270 | #endif |
1276 | #endif |
1271 | } |
1277 | } |
1272 | |
1278 | |
1273 | #ifdef POINTER_BLANK |
1279 | #ifdef POINTER_BLANK |
1274 | void |
1280 | void |
1275 | rxvt_term::pointer_blank () |
1281 | rxvt_term::pointer_blank () |
1276 | { |
1282 | { |
1277 | if (!OPTION (Opt_pointerBlank)) |
1283 | if (!option (Opt_pointerBlank)) |
1278 | return; |
1284 | return; |
1279 | |
1285 | |
1280 | XDefineCursor (dpy, vt, display->blank_cursor); |
1286 | XDefineCursor (dpy, vt, display->blank_cursor); |
1281 | XFlush (dpy); |
1287 | XFlush (dpy); |
1282 | |
1288 | |
… | |
… | |
1426 | else if (ev.xclient.data.l[1] == XEMBED_FOCUS_OUT) |
1432 | else if (ev.xclient.data.l[1] == XEMBED_FOCUS_OUT) |
1427 | focus_out (); |
1433 | focus_out (); |
1428 | } |
1434 | } |
1429 | #endif |
1435 | #endif |
1430 | } |
1436 | } |
1431 | break; |
|
|
1432 | |
|
|
1433 | case MappingNotify: |
|
|
1434 | XRefreshKeyboardMapping (&ev.xmapping); |
|
|
1435 | break; |
1437 | break; |
1436 | |
1438 | |
1437 | /* |
1439 | /* |
1438 | * XXX: this is not the _current_ arrangement |
1440 | * XXX: this is not the _current_ arrangement |
1439 | * Here's my conclusion: |
1441 | * Here's my conclusion: |
… | |
… | |
1458 | break; |
1460 | break; |
1459 | } |
1461 | } |
1460 | break; |
1462 | break; |
1461 | |
1463 | |
1462 | case FocusIn: |
1464 | case FocusIn: |
1463 | if (ev.xfocus.detail != NotifyInferior && ev.xfocus.detail != NotifyPointer) |
1465 | if (ev.xfocus.detail != NotifyInferior |
|
|
1466 | && ev.xfocus.detail != NotifyPointer |
|
|
1467 | && ev.xfocus.mode != NotifyGrab) |
1464 | focus_in (); |
1468 | focus_in (); |
1465 | break; |
1469 | break; |
1466 | |
1470 | |
1467 | case FocusOut: |
1471 | case FocusOut: |
1468 | if (ev.xfocus.detail != NotifyInferior && ev.xfocus.detail != NotifyPointer) |
1472 | if (ev.xfocus.detail != NotifyInferior |
|
|
1473 | && ev.xfocus.detail != NotifyPointer |
|
|
1474 | && ev.xfocus.mode != NotifyGrab) |
1469 | focus_out (); |
1475 | focus_out (); |
1470 | break; |
1476 | break; |
1471 | |
1477 | |
1472 | case ConfigureNotify: |
1478 | case ConfigureNotify: |
1473 | if (ev.xconfigure.window == parent[0]) |
1479 | if (ev.xconfigure.window == parent[0]) |
… | |
… | |
1477 | |
1483 | |
1478 | if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) |
1484 | if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) |
1479 | { |
1485 | { |
1480 | seen_resize = 1; |
1486 | seen_resize = 1; |
1481 | resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); |
1487 | resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); |
|
|
1488 | #ifdef XPM_BACKGROUND |
|
|
1489 | /* TODO: replace with update_pixmap() that should unify transparency and bg image handling ! */ |
|
|
1490 | if (!option (Opt_transparent) && bgPixmap.window_size_sensitive ()) |
|
|
1491 | { |
|
|
1492 | bgPixmap.render (); |
|
|
1493 | scr_touch (true); |
|
|
1494 | } |
|
|
1495 | #endif |
1482 | } |
1496 | } |
1483 | |
1497 | |
1484 | HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1498 | HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1485 | |
1499 | |
1486 | #ifdef TRANSPARENT |
1500 | #ifdef ENABLE_TRANSPARENCY |
1487 | if (OPTION (Opt_transparent)) |
1501 | if (option (Opt_transparent)) |
1488 | check_our_parents (); |
1502 | bgPixmap.render (); |
1489 | #endif |
1503 | #endif |
1490 | } |
1504 | } |
1491 | break; |
1505 | break; |
1492 | |
1506 | |
1493 | case PropertyNotify: |
1507 | case PropertyNotify: |
… | |
… | |
1525 | text_blink_ev.stop (); |
1539 | text_blink_ev.stop (); |
1526 | #endif |
1540 | #endif |
1527 | HOOK_INVOKE ((this, HOOK_UNMAP_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1541 | HOOK_INVOKE ((this, HOOK_UNMAP_NOTIFY, DT_XEVENT, &ev, DT_END)); |
1528 | break; |
1542 | break; |
1529 | |
1543 | |
1530 | #ifdef TRANSPARENT |
1544 | #ifdef ENABLE_TRANSPARENCY |
1531 | case ReparentNotify: |
1545 | case ReparentNotify: |
1532 | rootwin_cb (ev); |
1546 | rootwin_cb (ev); |
1533 | break; |
1547 | break; |
1534 | #endif /* TRANSPARENT */ |
1548 | #endif /* ENABLE_TRANSPARENCY */ |
1535 | |
1549 | |
1536 | case GraphicsExpose: |
1550 | case GraphicsExpose: |
1537 | case Expose: |
1551 | case Expose: |
1538 | if (ev.xany.window == vt) |
1552 | if (ev.xany.window == vt) |
1539 | { |
1553 | { |
… | |
… | |
1562 | if (isScrollbarWindow (ev.xany.window)) |
1576 | if (isScrollbarWindow (ev.xany.window)) |
1563 | { |
1577 | { |
1564 | scrollBar.setIdle (); |
1578 | scrollBar.setIdle (); |
1565 | scrollbar_show (0); |
1579 | scrollbar_show (0); |
1566 | } |
1580 | } |
1567 | |
|
|
1568 | #ifdef TRANSPARENT |
|
|
1569 | if (am_transparent && ev.xany.window == parent[0]) |
|
|
1570 | XClearWindow (dpy, ev.xany.window); |
|
|
1571 | #endif |
|
|
1572 | } |
1581 | } |
1573 | break; |
1582 | break; |
1574 | |
1583 | |
1575 | case MotionNotify: |
1584 | case MotionNotify: |
1576 | #ifdef POINTER_BLANK |
1585 | #ifdef POINTER_BLANK |
… | |
… | |
1674 | &ev.xbutton.x, &ev.xbutton.y, |
1683 | &ev.xbutton.x, &ev.xbutton.y, |
1675 | &unused_mask); |
1684 | &unused_mask); |
1676 | scr_move_to (scrollbar_position (ev.xbutton.y) - csrO, |
1685 | scr_move_to (scrollbar_position (ev.xbutton.y) - csrO, |
1677 | scrollbar_size ()); |
1686 | scrollbar_size ()); |
1678 | want_refresh = 1; |
1687 | want_refresh = 1; |
1679 | refresh_limit = 0; |
|
|
1680 | scrollbar_show (1); |
1688 | scrollbar_show (1); |
1681 | } |
1689 | } |
1682 | break; |
1690 | break; |
1683 | } |
1691 | } |
1684 | |
1692 | |
1685 | #if defined(CURSOR_BLINK) |
1693 | #if defined(CURSOR_BLINK) |
1686 | if (OPTION (Opt_cursorBlink) && ev.type == KeyPress) |
1694 | if (option (Opt_cursorBlink) && ev.type == KeyPress) |
1687 | { |
1695 | { |
1688 | if (hidden_cursor) |
1696 | if (hidden_cursor) |
1689 | { |
1697 | { |
1690 | hidden_cursor = 0; |
1698 | hidden_cursor = 0; |
1691 | want_refresh = 1; |
1699 | want_refresh = 1; |
… | |
… | |
1694 | cursor_blink_ev.start (NOW + CURSOR_BLINK_INTERVAL); |
1702 | cursor_blink_ev.start (NOW + CURSOR_BLINK_INTERVAL); |
1695 | } |
1703 | } |
1696 | #endif |
1704 | #endif |
1697 | |
1705 | |
1698 | #if defined(POINTER_BLANK) |
1706 | #if defined(POINTER_BLANK) |
1699 | if (OPTION (Opt_pointerBlank) && pointerBlankDelay > 0) |
1707 | if (option (Opt_pointerBlank) && pointerBlankDelay > 0) |
1700 | { |
1708 | { |
1701 | if (ev.type == MotionNotify |
1709 | if (ev.type == MotionNotify |
1702 | || ev.type == ButtonPress |
1710 | || ev.type == ButtonPress |
1703 | || ev.type == ButtonRelease) |
1711 | || ev.type == ButtonRelease) |
1704 | if (hidden_pointer) |
1712 | if (hidden_pointer) |
… | |
… | |
1726 | IMSetPosition (); |
1734 | IMSetPosition (); |
1727 | XSetICFocus (Input_Context); |
1735 | XSetICFocus (Input_Context); |
1728 | } |
1736 | } |
1729 | #endif |
1737 | #endif |
1730 | #if CURSOR_BLINK |
1738 | #if CURSOR_BLINK |
1731 | if (OPTION (Opt_cursorBlink)) |
1739 | if (option (Opt_cursorBlink)) |
1732 | cursor_blink_ev.start (NOW + CURSOR_BLINK_INTERVAL); |
1740 | cursor_blink_ev.start (NOW + CURSOR_BLINK_INTERVAL); |
1733 | #endif |
1741 | #endif |
1734 | #if OFF_FOCUS_FADING |
1742 | #if OFF_FOCUS_FADING |
1735 | if (rs[Rs_fade]) |
1743 | if (rs[Rs_fade]) |
1736 | { |
1744 | { |
1737 | pix_colors = pix_colors_focused; |
1745 | pix_colors = pix_colors_focused; |
1738 | scr_recolour (); |
1746 | scr_recolour (); |
1739 | } |
1747 | } |
1740 | #endif |
1748 | #endif |
|
|
1749 | #if ENABLE_FRILLS |
|
|
1750 | if (option (Opt_urgentOnBell)) |
|
|
1751 | { |
|
|
1752 | XWMHints *h; |
|
|
1753 | |
|
|
1754 | h = XGetWMHints(dpy, parent[0]); |
|
|
1755 | if (h != NULL) |
|
|
1756 | { |
|
|
1757 | h->flags &= ~XUrgencyHint; |
|
|
1758 | XSetWMHints(dpy, parent[0], h); |
|
|
1759 | } |
|
|
1760 | } |
|
|
1761 | #endif |
1741 | } |
1762 | } |
1742 | } |
1763 | } |
1743 | |
1764 | |
1744 | void |
1765 | void |
1745 | rxvt_term::focus_out () |
1766 | rxvt_term::focus_out () |
… | |
… | |
1753 | |
1774 | |
1754 | #if ENABLE_FRILLS || ISO_14755 |
1775 | #if ENABLE_FRILLS || ISO_14755 |
1755 | if (iso14755buf) |
1776 | if (iso14755buf) |
1756 | { |
1777 | { |
1757 | iso14755buf = 0; |
1778 | iso14755buf = 0; |
1758 | # if ENABLE_OVERLAY |
1779 | # if ISO_14755 |
1759 | scr_overlay_off (); |
1780 | scr_overlay_off (); |
1760 | # endif |
1781 | # endif |
1761 | } |
1782 | } |
1762 | #endif |
1783 | #endif |
1763 | #if USE_XIM |
1784 | #if USE_XIM |
1764 | if (Input_Context != NULL) |
1785 | if (Input_Context != NULL) |
1765 | XUnsetICFocus (Input_Context); |
1786 | XUnsetICFocus (Input_Context); |
1766 | #endif |
1787 | #endif |
1767 | #if CURSOR_BLINK |
1788 | #if CURSOR_BLINK |
1768 | if (OPTION (Opt_cursorBlink)) |
1789 | if (option (Opt_cursorBlink)) |
1769 | cursor_blink_ev.stop (); |
1790 | cursor_blink_ev.stop (); |
1770 | hidden_cursor = 0; |
1791 | hidden_cursor = 0; |
1771 | #endif |
1792 | #endif |
1772 | #if OFF_FOCUS_FADING |
1793 | #if OFF_FOCUS_FADING |
1773 | if (rs[Rs_fade]) |
1794 | if (rs[Rs_fade]) |
… | |
… | |
1790 | pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); |
1811 | pix_colors_focused [idx].fade (this, atoi (rs[Rs_fade]), pix_colors_unfocused [idx], c); |
1791 | } |
1812 | } |
1792 | #endif |
1813 | #endif |
1793 | } |
1814 | } |
1794 | |
1815 | |
1795 | #if TRANSPARENT || ENABLE_PERL |
1816 | #if ENABLE_TRANSPARENCY || ENABLE_PERL |
1796 | void |
1817 | void |
1797 | rxvt_term::rootwin_cb (XEvent &ev) |
1818 | rxvt_term::rootwin_cb (XEvent &ev) |
1798 | { |
1819 | { |
1799 | make_current (); |
1820 | make_current (); |
1800 | |
1821 | |
1801 | if (SHOULD_INVOKE (HOOK_ROOT_EVENT) |
1822 | if (SHOULD_INVOKE (HOOK_ROOT_EVENT) |
1802 | && HOOK_INVOKE ((this, HOOK_ROOT_EVENT, DT_XEVENT, &ev, DT_END))) |
1823 | && HOOK_INVOKE ((this, HOOK_ROOT_EVENT, DT_XEVENT, &ev, DT_END))) |
1803 | return; |
1824 | return; |
1804 | |
1825 | |
1805 | # if TRANSPARENT |
1826 | # if ENABLE_TRANSPARENCY |
1806 | switch (ev.type) |
1827 | switch (ev.type) |
1807 | { |
1828 | { |
1808 | case PropertyNotify: |
1829 | case PropertyNotify: |
1809 | /* |
1830 | /* |
1810 | * if user used some Esetroot compatible prog to set the root bg, |
1831 | * if user used some Esetroot compatible prog to set the root bg, |
1811 | * use the property to determine the pixmap. We use it later on. |
1832 | * use the property to determine the pixmap. We use it later on. |
1812 | */ |
1833 | */ |
1813 | if (ev.xproperty.atom != xa[XA_XROOTPMAP_ID] |
1834 | if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID] |
1814 | && ev.xproperty.atom != xa[XA_ESETROOT_PMAP_ID]) |
1835 | || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID]) |
1815 | return; |
1836 | { |
1816 | |
1837 | bgPixmap.set_root_pixmap (); |
1817 | /* FALLTHROUGH */ |
1838 | bgPixmap.render (); |
1818 | case ReparentNotify: |
1839 | } |
1819 | if (OPTION (Opt_transparent) && check_our_parents () && am_transparent) |
|
|
1820 | want_refresh = want_full_refresh = 1; |
|
|
1821 | break; |
1840 | break; |
1822 | } |
1841 | } |
1823 | # endif |
1842 | # endif |
1824 | } |
1843 | } |
1825 | #endif |
1844 | #endif |
… | |
… | |
2156 | selection_make (ev.time); |
2175 | selection_make (ev.time); |
2157 | break; |
2176 | break; |
2158 | |
2177 | |
2159 | case Button2: |
2178 | case Button2: |
2160 | if (IN_RANGE_EXC (ev.x, 0, width) && IN_RANGE_EXC (ev.y, 0, height)) // inside window? |
2179 | if (IN_RANGE_EXC (ev.x, 0, width) && IN_RANGE_EXC (ev.y, 0, height)) // inside window? |
2161 | selection_request (ev.time, ev.state & ModMetaMask ? Sel_Primary : Sel_Primary); |
2180 | selection_request (ev.time, ev.state & ModMetaMask ? Sel_Clipboard : Sel_Primary); |
2162 | break; |
2181 | break; |
2163 | |
2182 | |
2164 | #ifdef MOUSE_WHEEL |
2183 | #ifdef MOUSE_WHEEL |
2165 | case Button4: |
2184 | case Button4: |
2166 | case Button5: |
2185 | case Button5: |
… | |
… | |
2170 | |
2189 | |
2171 | v = ev.button == Button4 ? UP : DN; |
2190 | v = ev.button == Button4 ? UP : DN; |
2172 | |
2191 | |
2173 | if (ev.state & ShiftMask) |
2192 | if (ev.state & ShiftMask) |
2174 | i = 1; |
2193 | i = 1; |
2175 | else if (OPTION (Opt_mouseWheelScrollPage)) |
2194 | else if (option (Opt_mouseWheelScrollPage)) |
2176 | i = nrow - 1; |
2195 | i = nrow - 1; |
2177 | else |
2196 | else |
2178 | i = 5; |
2197 | i = 5; |
2179 | |
2198 | |
2180 | # ifdef MOUSE_SLIP_WHEELING |
2199 | # ifdef MOUSE_SLIP_WHEELING |
… | |
… | |
2201 | break; |
2220 | break; |
2202 | #endif |
2221 | #endif |
2203 | } |
2222 | } |
2204 | } |
2223 | } |
2205 | } |
2224 | } |
2206 | |
|
|
2207 | #ifdef TRANSPARENT |
|
|
2208 | #if TINTING |
|
|
2209 | /* taken from aterm-0.4.2 */ |
|
|
2210 | |
|
|
2211 | typedef uint32_t RUINT32T; |
|
|
2212 | |
|
|
2213 | void ShadeXImage(rxvt_term *term, XImage* srcImage, int shade, int rm, int gm, int bm) |
|
|
2214 | { |
|
|
2215 | int sh_r, sh_g, sh_b; |
|
|
2216 | RUINT32T mask_r, mask_g, mask_b; |
|
|
2217 | RUINT32T *lookup, *lookup_r, *lookup_g, *lookup_b; |
|
|
2218 | unsigned int lower_lim_r, lower_lim_g, lower_lim_b; |
|
|
2219 | unsigned int upper_lim_r, upper_lim_g, upper_lim_b; |
|
|
2220 | int i; |
|
|
2221 | |
|
|
2222 | Visual *visual = term->visual; |
|
|
2223 | |
|
|
2224 | if( visual->c_class != TrueColor || srcImage->format != ZPixmap ) return ; |
|
|
2225 | |
|
|
2226 | /* for convenience */ |
|
|
2227 | mask_r = visual->red_mask; |
|
|
2228 | mask_g = visual->green_mask; |
|
|
2229 | mask_b = visual->blue_mask; |
|
|
2230 | |
|
|
2231 | /* boring lookup table pre-initialization */ |
|
|
2232 | switch (srcImage->bits_per_pixel) { |
|
|
2233 | case 15: |
|
|
2234 | if ((mask_r != 0x7c00) || |
|
|
2235 | (mask_g != 0x03e0) || |
|
|
2236 | (mask_b != 0x001f)) |
|
|
2237 | return; |
|
|
2238 | lookup = (RUINT32T *) malloc (sizeof (RUINT32T)*(32+32+32)); |
|
|
2239 | lookup_r = lookup; |
|
|
2240 | lookup_g = lookup+32; |
|
|
2241 | lookup_b = lookup+32+32; |
|
|
2242 | sh_r = 10; |
|
|
2243 | sh_g = 5; |
|
|
2244 | sh_b = 0; |
|
|
2245 | break; |
|
|
2246 | case 16: |
|
|
2247 | if ((mask_r != 0xf800) || |
|
|
2248 | (mask_g != 0x07e0) || |
|
|
2249 | (mask_b != 0x001f)) |
|
|
2250 | return; |
|
|
2251 | lookup = (RUINT32T *) malloc (sizeof (RUINT32T)*(32+64+32)); |
|
|
2252 | lookup_r = lookup; |
|
|
2253 | lookup_g = lookup+32; |
|
|
2254 | lookup_b = lookup+32+64; |
|
|
2255 | sh_r = 11; |
|
|
2256 | sh_g = 5; |
|
|
2257 | sh_b = 0; |
|
|
2258 | break; |
|
|
2259 | case 24: |
|
|
2260 | if ((mask_r != 0xff0000) || |
|
|
2261 | (mask_g != 0x00ff00) || |
|
|
2262 | (mask_b != 0x0000ff)) |
|
|
2263 | return; |
|
|
2264 | lookup = (RUINT32T *) malloc (sizeof (RUINT32T)*(256+256+256)); |
|
|
2265 | lookup_r = lookup; |
|
|
2266 | lookup_g = lookup+256; |
|
|
2267 | lookup_b = lookup+256+256; |
|
|
2268 | sh_r = 16; |
|
|
2269 | sh_g = 8; |
|
|
2270 | sh_b = 0; |
|
|
2271 | break; |
|
|
2272 | case 32: |
|
|
2273 | if ((mask_r != 0xff0000) || |
|
|
2274 | (mask_g != 0x00ff00) || |
|
|
2275 | (mask_b != 0x0000ff)) |
|
|
2276 | return; |
|
|
2277 | lookup = (RUINT32T *) malloc (sizeof (RUINT32T)*(256+256+256)); |
|
|
2278 | lookup_r = lookup; |
|
|
2279 | lookup_g = lookup+256; |
|
|
2280 | lookup_b = lookup+256+256; |
|
|
2281 | sh_r = 16; |
|
|
2282 | sh_g = 8; |
|
|
2283 | sh_b = 0; |
|
|
2284 | break; |
|
|
2285 | default: |
|
|
2286 | return; /* we do not support this color depth */ |
|
|
2287 | } |
|
|
2288 | |
|
|
2289 | /* prepare limits for color transformation (each channel is handled separately) */ |
|
|
2290 | if (shade < 0) { |
|
|
2291 | shade = -shade; |
|
|
2292 | if (shade < 0) shade = 0; |
|
|
2293 | if (shade > 100) shade = 100; |
|
|
2294 | |
|
|
2295 | lower_lim_r = 65535-rm; |
|
|
2296 | lower_lim_g = 65535-gm; |
|
|
2297 | lower_lim_b = 65535-bm; |
|
|
2298 | |
|
|
2299 | lower_lim_r = 65535-(unsigned int)(((RUINT32T)lower_lim_r)*((RUINT32T)shade)/100); |
|
|
2300 | lower_lim_g = 65535-(unsigned int)(((RUINT32T)lower_lim_g)*((RUINT32T)shade)/100); |
|
|
2301 | lower_lim_b = 65535-(unsigned int)(((RUINT32T)lower_lim_b)*((RUINT32T)shade)/100); |
|
|
2302 | |
|
|
2303 | upper_lim_r = upper_lim_g = upper_lim_b = 65535; |
|
|
2304 | } else { |
|
|
2305 | if (shade < 0) shade = 0; |
|
|
2306 | if (shade > 100) shade = 100; |
|
|
2307 | |
|
|
2308 | lower_lim_r = lower_lim_g = lower_lim_b = 0; |
|
|
2309 | |
|
|
2310 | upper_lim_r = (unsigned int)((((RUINT32T)rm)*((RUINT32T)shade))/100); |
|
|
2311 | upper_lim_g = (unsigned int)((((RUINT32T)gm)*((RUINT32T)shade))/100); |
|
|
2312 | upper_lim_b = (unsigned int)((((RUINT32T)bm)*((RUINT32T)shade))/100); |
|
|
2313 | } |
|
|
2314 | |
|
|
2315 | /* switch red and blue bytes if necessary, we need it for some weird XServers like XFree86 3.3.3.1 */ |
|
|
2316 | if ((srcImage->bits_per_pixel == 24) && (mask_r >= 0xFF0000 )) |
|
|
2317 | { |
|
|
2318 | unsigned int tmp; |
|
|
2319 | |
|
|
2320 | tmp = lower_lim_r; |
|
|
2321 | lower_lim_r = lower_lim_b; |
|
|
2322 | lower_lim_b = tmp; |
|
|
2323 | |
|
|
2324 | tmp = upper_lim_r; |
|
|
2325 | upper_lim_r = upper_lim_b; |
|
|
2326 | upper_lim_b = tmp; |
|
|
2327 | } |
|
|
2328 | |
|
|
2329 | /* fill our lookup tables */ |
|
|
2330 | for (i = 0; i <= mask_r>>sh_r; i++) |
|
|
2331 | { |
|
|
2332 | RUINT32T tmp; |
|
|
2333 | tmp = ((RUINT32T)i)*((RUINT32T)(upper_lim_r-lower_lim_r)); |
|
|
2334 | tmp += ((RUINT32T)(mask_r>>sh_r))*((RUINT32T)lower_lim_r); |
|
|
2335 | lookup_r[i] = (tmp/65535)<<sh_r; |
|
|
2336 | } |
|
|
2337 | for (i = 0; i <= mask_g>>sh_g; i++) |
|
|
2338 | { |
|
|
2339 | RUINT32T tmp; |
|
|
2340 | tmp = ((RUINT32T)i)*((RUINT32T)(upper_lim_g-lower_lim_g)); |
|
|
2341 | tmp += ((RUINT32T)(mask_g>>sh_g))*((RUINT32T)lower_lim_g); |
|
|
2342 | lookup_g[i] = (tmp/65535)<<sh_g; |
|
|
2343 | } |
|
|
2344 | for (i = 0; i <= mask_b>>sh_b; i++) |
|
|
2345 | { |
|
|
2346 | RUINT32T tmp; |
|
|
2347 | tmp = ((RUINT32T)i)*((RUINT32T)(upper_lim_b-lower_lim_b)); |
|
|
2348 | tmp += ((RUINT32T)(mask_b>>sh_b))*((RUINT32T)lower_lim_b); |
|
|
2349 | lookup_b[i] = (tmp/65535)<<sh_b; |
|
|
2350 | } |
|
|
2351 | |
|
|
2352 | /* apply table to input image (replacing colors by newly calculated ones) */ |
|
|
2353 | switch (srcImage->bits_per_pixel) |
|
|
2354 | { |
|
|
2355 | case 15: |
|
|
2356 | { |
|
|
2357 | unsigned short *p1, *pf, *p, *pl; |
|
|
2358 | p1 = (unsigned short *) srcImage->data; |
|
|
2359 | pf = (unsigned short *) (srcImage->data + srcImage->height * srcImage->bytes_per_line); |
|
|
2360 | while (p1 < pf) |
|
|
2361 | { |
|
|
2362 | p = p1; |
|
|
2363 | pl = p1 + srcImage->width; |
|
|
2364 | for (; p < pl; p++) |
|
|
2365 | { |
|
|
2366 | *p = lookup_r[(*p & 0x7c00)>>10] | |
|
|
2367 | lookup_g[(*p & 0x03e0)>> 5] | |
|
|
2368 | lookup_b[(*p & 0x001f)]; |
|
|
2369 | } |
|
|
2370 | p1 = (unsigned short *) ((char *) p1 + srcImage->bytes_per_line); |
|
|
2371 | } |
|
|
2372 | break; |
|
|
2373 | } |
|
|
2374 | case 16: |
|
|
2375 | { |
|
|
2376 | unsigned short *p1, *pf, *p, *pl; |
|
|
2377 | p1 = (unsigned short *) srcImage->data; |
|
|
2378 | pf = (unsigned short *) (srcImage->data + srcImage->height * srcImage->bytes_per_line); |
|
|
2379 | while (p1 < pf) |
|
|
2380 | { |
|
|
2381 | p = p1; |
|
|
2382 | pl = p1 + srcImage->width; |
|
|
2383 | for (; p < pl; p++) |
|
|
2384 | { |
|
|
2385 | *p = lookup_r[(*p & 0xf800)>>11] | |
|
|
2386 | lookup_g[(*p & 0x07e0)>> 5] | |
|
|
2387 | lookup_b[(*p & 0x001f)]; |
|
|
2388 | } |
|
|
2389 | p1 = (unsigned short *) ((char *) p1 + srcImage->bytes_per_line); |
|
|
2390 | } |
|
|
2391 | break; |
|
|
2392 | } |
|
|
2393 | case 24: |
|
|
2394 | { |
|
|
2395 | unsigned char *p1, *pf, *p, *pl; |
|
|
2396 | p1 = (unsigned char *) srcImage->data; |
|
|
2397 | pf = (unsigned char *) (srcImage->data + srcImage->height * srcImage->bytes_per_line); |
|
|
2398 | while (p1 < pf) |
|
|
2399 | { |
|
|
2400 | p = p1; |
|
|
2401 | pl = p1 + srcImage->width * 3; |
|
|
2402 | for (; p < pl; p += 3) |
|
|
2403 | { |
|
|
2404 | p[0] = lookup_r[(p[0] & 0xff0000)>>16]; |
|
|
2405 | p[1] = lookup_r[(p[1] & 0x00ff00)>> 8]; |
|
|
2406 | p[2] = lookup_r[(p[2] & 0x0000ff)]; |
|
|
2407 | } |
|
|
2408 | p1 = (unsigned char *) ((char *) p1 + srcImage->bytes_per_line); |
|
|
2409 | } |
|
|
2410 | break; |
|
|
2411 | } |
|
|
2412 | case 32: |
|
|
2413 | { |
|
|
2414 | RUINT32T *p1, *pf, *p, *pl; |
|
|
2415 | p1 = (RUINT32T *) srcImage->data; |
|
|
2416 | pf = (RUINT32T *) (srcImage->data + srcImage->height * srcImage->bytes_per_line); |
|
|
2417 | |
|
|
2418 | while (p1 < pf) |
|
|
2419 | { |
|
|
2420 | p = p1; |
|
|
2421 | pl = p1 + srcImage->width; |
|
|
2422 | for (; p < pl; p++) |
|
|
2423 | { |
|
|
2424 | *p = lookup_r[(*p & 0xff0000)>>16] | |
|
|
2425 | lookup_g[(*p & 0x00ff00)>> 8] | |
|
|
2426 | lookup_b[(*p & 0x0000ff)] | |
|
|
2427 | (*p & ~0xffffff); |
|
|
2428 | } |
|
|
2429 | p1 = (RUINT32T *) ((char *) p1 + srcImage->bytes_per_line); |
|
|
2430 | } |
|
|
2431 | break; |
|
|
2432 | } |
|
|
2433 | } |
|
|
2434 | |
|
|
2435 | free (lookup); |
|
|
2436 | } |
|
|
2437 | #endif |
|
|
2438 | |
|
|
2439 | /* |
|
|
2440 | * Check our parents are still who we think they are. |
|
|
2441 | * Do transparency updates if required |
|
|
2442 | */ |
|
|
2443 | int |
|
|
2444 | rxvt_term::check_our_parents () |
|
|
2445 | { |
|
|
2446 | int i, pchanged, aformat, have_pixmap, rootdepth; |
|
|
2447 | unsigned long nitems, bytes_after; |
|
|
2448 | Atom atype; |
|
|
2449 | unsigned char *prop = NULL; |
|
|
2450 | Window root, oldp, *list; |
|
|
2451 | Pixmap rootpixmap = None; |
|
|
2452 | XWindowAttributes wattr, wrootattr; |
|
|
2453 | |
|
|
2454 | pchanged = 0; |
|
|
2455 | |
|
|
2456 | if (!OPTION (Opt_transparent)) |
|
|
2457 | return pchanged; /* Don't try any more */ |
|
|
2458 | |
|
|
2459 | XGetWindowAttributes (dpy, display->root, &wrootattr); |
|
|
2460 | rootdepth = wrootattr.depth; |
|
|
2461 | |
|
|
2462 | XGetWindowAttributes (dpy, parent[0], &wattr); |
|
|
2463 | |
|
|
2464 | if (rootdepth != wattr.depth) |
|
|
2465 | { |
|
|
2466 | if (am_transparent) |
|
|
2467 | { |
|
|
2468 | pchanged = 1; |
|
|
2469 | XSetWindowBackground (dpy, vt, pix_colors_focused[Color_bg]); |
|
|
2470 | am_transparent = am_pixmap_trans = 0; |
|
|
2471 | } |
|
|
2472 | |
|
|
2473 | return pchanged; /* Don't try any more */ |
|
|
2474 | } |
|
|
2475 | |
|
|
2476 | /* Get all X ops out of the queue so that our information is up-to-date. */ |
|
|
2477 | XSync (dpy, False); |
|
|
2478 | |
|
|
2479 | /* |
|
|
2480 | * Make the frame window set by the window manager have |
|
|
2481 | * the root background. Some window managers put multiple nested frame |
|
|
2482 | * windows for each client, so we have to take care about that. |
|
|
2483 | */ |
|
|
2484 | i = (xa[XA_XROOTPMAP_ID] |
|
|
2485 | && XGetWindowProperty (dpy, display->root, xa[XA_XROOTPMAP_ID], |
|
|
2486 | 0L, 1L, False, XA_PIXMAP, &atype, &aformat, |
|
|
2487 | &nitems, &bytes_after, &prop) == Success); |
|
|
2488 | |
|
|
2489 | if (!i || prop == NULL) |
|
|
2490 | i = (xa[XA_ESETROOT_PMAP_ID] |
|
|
2491 | && XGetWindowProperty (dpy, display->root, xa[XA_ESETROOT_PMAP_ID], |
|
|
2492 | 0L, 1L, False, XA_PIXMAP, &atype, &aformat, |
|
|
2493 | &nitems, &bytes_after, &prop) == Success); |
|
|
2494 | |
|
|
2495 | if (!i || prop == NULL |
|
|
2496 | #if TINTING |
|
|
2497 | || !ISSET_PIXCOLOR (Color_tint) |
|
|
2498 | #endif |
|
|
2499 | ) |
|
|
2500 | have_pixmap = 0; |
|
|
2501 | else |
|
|
2502 | { |
|
|
2503 | have_pixmap = 1; |
|
|
2504 | rootpixmap = *(Pixmap *)prop; |
|
|
2505 | XFree (prop); |
|
|
2506 | } |
|
|
2507 | |
|
|
2508 | if (have_pixmap) |
|
|
2509 | { |
|
|
2510 | /* |
|
|
2511 | * Copy display->root pixmap transparency |
|
|
2512 | */ |
|
|
2513 | int sx, sy, nx, ny; |
|
|
2514 | unsigned int nw, nh; |
|
|
2515 | Window cr; |
|
|
2516 | XImage *image; |
|
|
2517 | GC gc; |
|
|
2518 | XGCValues gcvalue; |
|
|
2519 | |
|
|
2520 | XTranslateCoordinates (dpy, parent[0], display->root, |
|
|
2521 | 0, 0, &sx, &sy, &cr); |
|
|
2522 | nw = (unsigned int)szHint.width; |
|
|
2523 | nh = (unsigned int)szHint.height; |
|
|
2524 | nx = ny = 0; |
|
|
2525 | |
|
|
2526 | if (sx < 0) |
|
|
2527 | { |
|
|
2528 | nw += sx; |
|
|
2529 | nx = -sx; |
|
|
2530 | sx = 0; |
|
|
2531 | } |
|
|
2532 | |
|
|
2533 | if (sy < 0) |
|
|
2534 | { |
|
|
2535 | nh += sy; |
|
|
2536 | ny = -sy; |
|
|
2537 | sy = 0; |
|
|
2538 | } |
|
|
2539 | |
|
|
2540 | min_it (nw, (unsigned int) (wrootattr.width - sx)); |
|
|
2541 | min_it (nh, (unsigned int) (wrootattr.height - sy)); |
|
|
2542 | |
|
|
2543 | XSync (dpy, False); |
|
|
2544 | allowedxerror = -1; |
|
|
2545 | image = XGetImage (dpy, rootpixmap, sx, sy, nw, nh, AllPlanes, ZPixmap); |
|
|
2546 | |
|
|
2547 | /* XXX: handle BadMatch - usually because we're outside the pixmap */ |
|
|
2548 | /* XXX: may need a delay here? */ |
|
|
2549 | allowedxerror = 0; |
|
|
2550 | |
|
|
2551 | if (image == NULL) |
|
|
2552 | { |
|
|
2553 | if (am_transparent && am_pixmap_trans) |
|
|
2554 | { |
|
|
2555 | pchanged = 1; |
|
|
2556 | if (pixmap != None) |
|
|
2557 | { |
|
|
2558 | XFreePixmap (dpy, pixmap); |
|
|
2559 | pixmap = None; |
|
|
2560 | } |
|
|
2561 | } |
|
|
2562 | |
|
|
2563 | am_pixmap_trans = 0; |
|
|
2564 | } |
|
|
2565 | else |
|
|
2566 | { |
|
|
2567 | if (pixmap != None) |
|
|
2568 | XFreePixmap (dpy, pixmap); |
|
|
2569 | |
|
|
2570 | #if TINTING |
|
|
2571 | if (ISSET_PIXCOLOR (Color_tint)) |
|
|
2572 | { |
|
|
2573 | int shade = rs[Rs_shade] ? atoi (rs[Rs_shade]) : 100; |
|
|
2574 | |
|
|
2575 | rgba c; |
|
|
2576 | pix_colors_focused [Color_tint].get (c); |
|
|
2577 | |
|
|
2578 | ShadeXImage (this, image, shade, c.r, c.g, c.b); |
|
|
2579 | } |
|
|
2580 | #endif |
|
|
2581 | |
|
|
2582 | pixmap = XCreatePixmap (dpy, vt, szHint.width, szHint.height, image->depth); |
|
|
2583 | gc = XCreateGC (dpy, vt, 0UL, &gcvalue); |
|
|
2584 | XPutImage (dpy, pixmap, gc, image, 0, 0, |
|
|
2585 | nx, ny, image->width, image->height); |
|
|
2586 | XFreeGC (dpy, gc); |
|
|
2587 | XDestroyImage (image); |
|
|
2588 | XSetWindowBackgroundPixmap (dpy, parent[0], pixmap); |
|
|
2589 | XClearWindow (dpy, parent[0]); |
|
|
2590 | |
|
|
2591 | if (!am_transparent || !am_pixmap_trans) |
|
|
2592 | pchanged = 1; |
|
|
2593 | |
|
|
2594 | am_transparent = am_pixmap_trans = 1; |
|
|
2595 | } |
|
|
2596 | } |
|
|
2597 | |
|
|
2598 | if (am_pixmap_trans) |
|
|
2599 | XSetWindowBackgroundPixmap (dpy, vt, ParentRelative); |
|
|
2600 | else |
|
|
2601 | { |
|
|
2602 | unsigned int n; |
|
|
2603 | /* |
|
|
2604 | * InheritPixmap transparency |
|
|
2605 | */ |
|
|
2606 | for (i = 1; i < (int) (sizeof (parent) / sizeof (Window)); i++) |
|
|
2607 | { |
|
|
2608 | oldp = parent[i]; |
|
|
2609 | XQueryTree (dpy, parent[i - 1], &root, &parent[i], &list, &n); |
|
|
2610 | XFree (list); |
|
|
2611 | |
|
|
2612 | if (parent[i] == display->root) |
|
|
2613 | { |
|
|
2614 | if (oldp != None) |
|
|
2615 | pchanged = 1; |
|
|
2616 | |
|
|
2617 | break; |
|
|
2618 | } |
|
|
2619 | |
|
|
2620 | if (oldp != parent[i]) |
|
|
2621 | pchanged = 1; |
|
|
2622 | } |
|
|
2623 | |
|
|
2624 | n = 0; |
|
|
2625 | |
|
|
2626 | if (pchanged) |
|
|
2627 | for (; n < (unsigned int)i; n++) |
|
|
2628 | { |
|
|
2629 | XGetWindowAttributes (dpy, parent[n], &wattr); |
|
|
2630 | |
|
|
2631 | if (wattr.depth != rootdepth || wattr.c_class == InputOnly) |
|
|
2632 | { |
|
|
2633 | n = (int) (sizeof (parent) / sizeof (Window)) + 1; |
|
|
2634 | break; |
|
|
2635 | } |
|
|
2636 | } |
|
|
2637 | |
|
|
2638 | if (n > (sizeof (parent) / sizeof (parent[0]))) |
|
|
2639 | { |
|
|
2640 | XSetWindowBackground (dpy, parent[0], pix_colors_focused[Color_border]); |
|
|
2641 | XSetWindowBackground (dpy, vt, pix_colors_focused[Color_bg]); |
|
|
2642 | am_transparent = 0; |
|
|
2643 | /* XXX: also turn off Opt_transparent? */ |
|
|
2644 | } |
|
|
2645 | else |
|
|
2646 | { |
|
|
2647 | for (n = 0; n < (unsigned int)i; n++) |
|
|
2648 | { |
|
|
2649 | XSetWindowBackgroundPixmap (dpy, parent[n], ParentRelative); |
|
|
2650 | XClearWindow (dpy, parent[n]); |
|
|
2651 | } |
|
|
2652 | |
|
|
2653 | XSetWindowBackgroundPixmap (dpy, vt, ParentRelative); |
|
|
2654 | am_transparent = 1; |
|
|
2655 | } |
|
|
2656 | |
|
|
2657 | for (; i < (int) (sizeof (parent) / sizeof (Window)); i++) |
|
|
2658 | parent[i] = None; |
|
|
2659 | } |
|
|
2660 | |
|
|
2661 | if (scrollBar.win) |
|
|
2662 | { |
|
|
2663 | XSetWindowBackgroundPixmap (dpy, scrollBar.win, ParentRelative); |
|
|
2664 | scrollBar.setIdle (); |
|
|
2665 | scrollbar_show (0); |
|
|
2666 | } |
|
|
2667 | |
|
|
2668 | if (am_transparent) |
|
|
2669 | { |
|
|
2670 | want_refresh = want_full_refresh = 1; |
|
|
2671 | if (am_pixmap_trans) |
|
|
2672 | flush (); |
|
|
2673 | } |
|
|
2674 | |
|
|
2675 | return pchanged; |
|
|
2676 | } |
|
|
2677 | #endif |
|
|
2678 | |
2225 | |
2679 | /*}}} */ |
2226 | /*}}} */ |
2680 | |
2227 | |
2681 | bool |
2228 | bool |
2682 | rxvt_term::cmd_parse () |
2229 | rxvt_term::cmd_parse () |
… | |
… | |
2731 | if (ch == C0_LF) |
2278 | if (ch == C0_LF) |
2732 | nlines++; |
2279 | nlines++; |
2733 | |
2280 | |
2734 | refresh_count++; |
2281 | refresh_count++; |
2735 | |
2282 | |
2736 | if (!OPTION (Opt_jumpScroll) |
2283 | if (!option (Opt_jumpScroll) || refresh_count >= nrow - 1) |
2737 | || (refresh_count >= refresh_limit * (nrow - 1))) |
|
|
2738 | { |
2284 | { |
2739 | refreshnow = true; |
|
|
2740 | refresh_count = 0; |
2285 | refresh_count = 0; |
|
|
2286 | |
|
|
2287 | if (!option (Opt_skipScroll) || io_manager::now () > NOW + 1. / 60.) |
|
|
2288 | { |
|
|
2289 | refreshnow = true; |
2741 | ch = NOCHAR; |
2290 | ch = NOCHAR; |
2742 | break; |
2291 | break; |
|
|
2292 | } |
2743 | } |
2293 | } |
2744 | |
2294 | |
2745 | // scr_add_lines only works for nlines <= nrow - 1. |
2295 | // scr_add_lines only works for nlines <= nrow - 1. |
2746 | if (nlines >= nrow - 1) |
2296 | if (nlines >= nrow - 1) |
2747 | { |
2297 | { |
… | |
… | |
2775 | && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))) |
2325 | && HOOK_INVOKE ((this, HOOK_ADD_LINES, DT_WCS_LEN, buf, str - buf, DT_END)))) |
2776 | scr_add_lines (buf, str - buf, nlines); |
2326 | scr_add_lines (buf, str - buf, nlines); |
2777 | |
2327 | |
2778 | /* |
2328 | /* |
2779 | * If there have been a lot of new lines, then update the screen |
2329 | * If there have been a lot of new lines, then update the screen |
2780 | * What the heck I'll cheat and only refresh less than every page-full. |
2330 | * What the heck we'll cheat and only refresh less than every page-full. |
2781 | * the number of pages between refreshes is refresh_limit, which |
2331 | * if skipScroll is enabled. |
2782 | * is incremented here because we must be doing flat-out scrolling. |
|
|
2783 | */ |
2332 | */ |
2784 | if (refreshnow) |
2333 | if (refreshnow) |
2785 | { |
2334 | { |
2786 | if (OPTION (Opt_jumpScroll) && refresh_limit < REFRESH_PERIOD) |
|
|
2787 | refresh_limit++; |
|
|
2788 | else |
|
|
2789 | { |
|
|
2790 | flag = true; |
2335 | flag = true; |
2791 | //TODO: due to popular request, implement "skipscroll" option here |
|
|
2792 | scr_refresh (); |
2336 | scr_refresh (); |
2793 | want_refresh = 1; |
2337 | want_refresh = 1; |
2794 | } |
|
|
2795 | } |
2338 | } |
2796 | |
2339 | |
2797 | } |
2340 | } |
2798 | else |
2341 | else |
2799 | { |
2342 | { |
… | |
… | |
2948 | { |
2491 | { |
2949 | if ((buf[len++] = cmd_getc ()) == 'i') |
2492 | if ((buf[len++] = cmd_getc ()) == 'i') |
2950 | break; /* done = 1 */ |
2493 | break; /* done = 1 */ |
2951 | } |
2494 | } |
2952 | } |
2495 | } |
2953 | |
2496 | |
2954 | for (i = 0; i < len; i++) |
2497 | for (i = 0; i < len; i++) |
2955 | if (putc (buf[i], fd) == EOF) |
2498 | if (putc (buf[i], fd) == EOF) |
2956 | { |
2499 | { |
2957 | done = 1; |
2500 | done = 1; |
2958 | break; |
2501 | break; |
… | |
… | |
3020 | process_dcs_seq (); |
2563 | process_dcs_seq (); |
3021 | break; |
2564 | break; |
3022 | case 0x9b: /* CSI */ |
2565 | case 0x9b: /* CSI */ |
3023 | process_csi_seq (); |
2566 | process_csi_seq (); |
3024 | break; |
2567 | break; |
3025 | case 0x9d: /* CSI */ |
2568 | case 0x9d: /* OSC */ |
3026 | process_osc_seq (); |
2569 | process_osc_seq (); |
3027 | break; |
2570 | break; |
3028 | #endif |
2571 | #endif |
3029 | } |
2572 | } |
3030 | } |
2573 | } |
… | |
… | |
3258 | unicode_t ch, priv, i; |
2801 | unicode_t ch, priv, i; |
3259 | unsigned int nargs, p; |
2802 | unsigned int nargs, p; |
3260 | int n, ndef; |
2803 | int n, ndef; |
3261 | int arg[ESC_ARGS]; |
2804 | int arg[ESC_ARGS]; |
3262 | |
2805 | |
3263 | for (nargs = ESC_ARGS; nargs > 0;) |
2806 | memset (arg, 0, sizeof (arg)); |
3264 | arg[--nargs] = 0; |
2807 | nargs = 0; |
3265 | |
2808 | |
3266 | priv = 0; |
2809 | priv = 0; |
3267 | ch = cmd_getc (); |
2810 | ch = cmd_getc (); |
3268 | if (ch >= '<' && ch <= '?') |
2811 | if (ch >= '<' && ch <= '?') |
3269 | { /* '<' '=' '>' '?' */ |
2812 | { /* '<' '=' '>' '?' */ |
… | |
… | |
3313 | switch (priv) |
2856 | switch (priv) |
3314 | { |
2857 | { |
3315 | case '>': |
2858 | case '>': |
3316 | if (ch == CSI_DA) /* secondary device attributes */ |
2859 | if (ch == CSI_DA) /* secondary device attributes */ |
3317 | { |
2860 | { |
3318 | // first parameter is normally 0 for vt100, 1 for some newer vtxxx, 'R' for rxvt, |
2861 | // first parameter is normally 0 for vt100, 1 for vt220, 'R' for rxvt, |
3319 | // 'U' for rxvt-unicode != 7.[34] (where it was broken). |
2862 | // 'U' for rxvt-unicode != 7.[34] (where it was broken). |
3320 | // |
2863 | // |
3321 | // second parameter is xterm patch level for xterm, MMmmpp (e.g. 20703) for rxvt |
2864 | // second parameter is xterm patch level for xterm, MMmmpp (e.g. 20703) for rxvt |
3322 | // and Mm (e.g. 72 for 7.2) for urxvt <= 7.2, and 94 for later versions, to signify |
2865 | // and Mm (e.g. 72 for 7.2) for urxvt <= 7.2, and 94 for later versions, to signify |
3323 | // that we do not support xterm mouse reporting (should be 95 when we do). |
2866 | // that we do not support xterm mouse reporting (should be 95 when we do). |
… | |
… | |
3457 | break; |
3000 | break; |
3458 | case 6: /* CPR requested */ |
3001 | case 6: /* CPR requested */ |
3459 | scr_report_position (); |
3002 | scr_report_position (); |
3460 | break; |
3003 | break; |
3461 | case 7: /* unofficial extension */ |
3004 | case 7: /* unofficial extension */ |
3462 | if (OPTION (Opt_insecure)) |
3005 | if (option (Opt_insecure)) |
3463 | tt_printf ("%-.250s\012", rs[Rs_display_name]); |
3006 | tt_printf ("%-.250s\012", rs[Rs_display_name]); |
3464 | break; |
3007 | break; |
3465 | case 8: /* unofficial extension */ |
3008 | case 8: /* unofficial extension */ |
3466 | process_xterm_seq (XTerm_title, RESNAME "-" VERSION, CHAR_ST); |
3009 | process_xterm_seq (XTerm_title, RESNAME "-" VERSION, CHAR_ST); |
3467 | break; |
3010 | break; |
… | |
… | |
3631 | break; |
3174 | break; |
3632 | case 20: /* report icon label */ |
3175 | case 20: /* report icon label */ |
3633 | { |
3176 | { |
3634 | char *s; |
3177 | char *s; |
3635 | XGetIconName (dpy, parent[0], &s); |
3178 | XGetIconName (dpy, parent[0], &s); |
3636 | tt_printf ("\033]L%-.250s\234", OPTION (Opt_insecure) && s ? s : ""); /* 8bit ST */ |
3179 | tt_printf ("\033]L%-.250s\234", option (Opt_insecure) && s ? s : ""); /* 8bit ST */ |
3637 | XFree (s); |
3180 | XFree (s); |
3638 | } |
3181 | } |
3639 | break; |
3182 | break; |
3640 | case 21: /* report window title */ |
3183 | case 21: /* report window title */ |
3641 | { |
3184 | { |
3642 | char *s; |
3185 | char *s; |
3643 | XFetchName (dpy, parent[0], &s); |
3186 | XFetchName (dpy, parent[0], &s); |
3644 | tt_printf ("\033]l%-.250s\234", OPTION (Opt_insecure) && s ? s : ""); /* 8bit ST */ |
3187 | tt_printf ("\033]l%-.250s\234", option (Opt_insecure) && s ? s : ""); /* 8bit ST */ |
3645 | XFree (s); |
3188 | XFree (s); |
3646 | } |
3189 | } |
3647 | break; |
3190 | break; |
3648 | } |
3191 | } |
3649 | } |
3192 | } |
… | |
… | |
3776 | int saveop = op; |
3319 | int saveop = op; |
3777 | |
3320 | |
3778 | dLocal (Display *, dpy); |
3321 | dLocal (Display *, dpy); |
3779 | |
3322 | |
3780 | assert (str != NULL); |
3323 | assert (str != NULL); |
3781 | |
3324 | |
3782 | if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_INT, op, DT_STR, str, DT_END))) |
3325 | if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_INT, op, DT_STR, str, DT_END))) |
3783 | return; |
3326 | return; |
3784 | |
3327 | |
3785 | switch (op) |
3328 | switch (op) |
3786 | { |
3329 | { |
… | |
… | |
3881 | break; |
3424 | break; |
3882 | case URxvt_Color_IT: |
3425 | case URxvt_Color_IT: |
3883 | process_color_seq (op, Color_IT, str, resp); |
3426 | process_color_seq (op, Color_IT, str, resp); |
3884 | break; |
3427 | break; |
3885 | #endif |
3428 | #endif |
3886 | #if TRANSPARENT && TINTING |
3429 | #if ENABLE_TRANSPARENCY |
3887 | case URxvt_Color_tint: |
3430 | case URxvt_Color_tint: |
3888 | process_color_seq (op, Color_tint, str, resp); |
3431 | process_color_seq (op, Color_tint, str, resp); |
|
|
3432 | { |
|
|
3433 | bool changed = false; |
|
|
3434 | if (ISSET_PIXCOLOR (Color_tint)) |
|
|
3435 | changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]); |
|
|
3436 | else |
|
|
3437 | changed = bgPixmap.unset_tint (); |
|
|
3438 | if (changed) |
|
|
3439 | bgPixmap.render (); |
|
|
3440 | } |
3889 | |
3441 | |
3890 | check_our_parents (); |
|
|
3891 | |
|
|
3892 | if (am_transparent) |
|
|
3893 | want_full_refresh = want_refresh = 1; |
|
|
3894 | |
|
|
3895 | break; |
3442 | break; |
3896 | #endif |
3443 | #endif |
3897 | |
3444 | |
|
|
3445 | #if XPM_BACKGROUND |
3898 | case Rxvt_Pixmap: |
3446 | case Rxvt_Pixmap: |
|
|
3447 | if (!strcmp (str, "?")) |
3899 | { |
3448 | { |
|
|
3449 | char str[256]; |
|
|
3450 | |
|
|
3451 | sprintf (str, "[%dx%d+%d+%d]", /* can't presume snprintf () ! */ |
|
|
3452 | min (bgPixmap.h_scale, 32767), min (bgPixmap.v_scale, 32767), |
|
|
3453 | min (bgPixmap.h_align, 32767), min (bgPixmap.v_align, 32767)); |
|
|
3454 | process_xterm_seq (XTerm_title, str, CHAR_ST); |
|
|
3455 | } |
|
|
3456 | else |
|
|
3457 | { |
|
|
3458 | int changed = 0; |
|
|
3459 | |
3900 | if (*str != ';') |
3460 | if (*str != ';') |
3901 | { |
3461 | { |
3902 | #if XPM_BACKGROUND |
|
|
3903 | scale_pixmap (""); /* reset to default scaling */ |
3462 | /* reset to default scaling :*/ |
|
|
3463 | bgPixmap.unset_geometry (); |
3904 | set_bgPixmap (str); /* change pixmap */ |
3464 | if (bgPixmap.set_file (str)) /* change pixmap */ |
|
|
3465 | changed++; |
|
|
3466 | str = strchr (str, ';'); |
|
|
3467 | if (str == NULL) |
|
|
3468 | bgPixmap.set_defaultGeometry (); |
|
|
3469 | } |
|
|
3470 | while (str) |
|
|
3471 | { |
|
|
3472 | str++; |
|
|
3473 | if (bgPixmap.set_geometry (str)) |
|
|
3474 | changed++; |
|
|
3475 | str = strchr (str, ';'); |
|
|
3476 | } |
|
|
3477 | if (changed) |
|
|
3478 | { |
|
|
3479 | bgPixmap.render (); |
3905 | scr_touch (true); |
3480 | scr_touch (true); |
3906 | #endif |
|
|
3907 | } |
3481 | } |
3908 | |
|
|
3909 | int changed = 0; |
|
|
3910 | |
|
|
3911 | while ((str = strchr (str, ';')) != NULL) |
|
|
3912 | { |
|
|
3913 | str++; |
|
|
3914 | #if XPM_BACKGROUND |
|
|
3915 | changed += scale_pixmap (str); |
|
|
3916 | #endif |
|
|
3917 | } |
3482 | } |
3918 | |
|
|
3919 | if (changed) |
|
|
3920 | { |
|
|
3921 | #ifdef XPM_BACKGROUND |
|
|
3922 | resize_pixmap (); |
|
|
3923 | scr_touch (true); |
|
|
3924 | #endif |
|
|
3925 | } |
|
|
3926 | } |
|
|
3927 | break; |
3483 | break; |
|
|
3484 | #endif |
3928 | |
3485 | |
3929 | case Rxvt_restoreFG: |
3486 | case Rxvt_restoreFG: |
3930 | set_window_color (Color_fg, str); |
3487 | set_window_color (Color_fg, str); |
3931 | break; |
3488 | break; |
3932 | case Rxvt_restoreBG: |
3489 | case Rxvt_restoreBG: |
… | |
… | |
3957 | case URxvt_italicFont: |
3514 | case URxvt_italicFont: |
3958 | case URxvt_boldItalicFont: |
3515 | case URxvt_boldItalicFont: |
3959 | #endif |
3516 | #endif |
3960 | if (query) |
3517 | if (query) |
3961 | tt_printf ("\33]%d;%-.250s%c", saveop, |
3518 | tt_printf ("\33]%d;%-.250s%c", saveop, |
3962 | OPTION (Opt_insecure) && fontset[op - URxvt_font]->fontdesc |
3519 | option (Opt_insecure) && fontset[op - URxvt_font]->fontdesc |
3963 | ? fontset[op - URxvt_font]->fontdesc : "", |
3520 | ? fontset[op - URxvt_font]->fontdesc : "", |
3964 | resp); |
3521 | resp); |
3965 | else |
3522 | else |
3966 | { |
3523 | { |
3967 | const char *&res = rs[Rs_font + (op - URxvt_font)]; |
3524 | const char *&res = rs[Rs_font + (op - URxvt_font)]; |
… | |
… | |
3981 | break; |
3538 | break; |
3982 | |
3539 | |
3983 | #if !ENABLE_MINIMAL |
3540 | #if !ENABLE_MINIMAL |
3984 | case URxvt_locale: |
3541 | case URxvt_locale: |
3985 | if (query) |
3542 | if (query) |
3986 | tt_printf ("\33]%d;%-.250s%c", op, OPTION (Opt_insecure) ? locale : "", resp); |
3543 | tt_printf ("\33]%d;%-.250s%c", op, option (Opt_insecure) ? locale : "", resp); |
3987 | else |
3544 | else |
3988 | { |
3545 | { |
3989 | set_locale (str); |
3546 | set_locale (str); |
3990 | pty->set_utf8_mode (enc_utf8); |
3547 | pty->set_utf8_mode (enc_utf8); |
3991 | init_xlocale (); |
3548 | init_xlocale (); |
… | |
… | |
4054 | { |
3611 | { |
4055 | unsigned int i, j; |
3612 | unsigned int i, j; |
4056 | int state; |
3613 | int state; |
4057 | |
3614 | |
4058 | static const struct |
3615 | static const struct |
4059 | { |
3616 | { |
4060 | const int argval; |
3617 | const int argval; |
4061 | const unsigned long bit; |
3618 | const unsigned long bit; |
4062 | } |
|
|
4063 | |
|
|
4064 | argtopriv[] = { |
3619 | } argtopriv[] = { |
4065 | { 1, PrivMode_aplCUR }, |
3620 | { 1, PrivMode_aplCUR }, |
4066 | { 2, PrivMode_vt52 }, |
3621 | { 2, PrivMode_vt52 }, |
4067 | { 3, PrivMode_132 }, |
3622 | { 3, PrivMode_132 }, |
4068 | { 4, PrivMode_smoothScroll }, |
3623 | { 4, PrivMode_smoothScroll }, |
4069 | { 5, PrivMode_rVideo }, |
3624 | { 5, PrivMode_rVideo }, |
… | |
… | |
4132 | scr_touch (true); |
3687 | scr_touch (true); |
4133 | break; |
3688 | break; |
4134 | #endif |
3689 | #endif |
4135 | case 1048: /* alternative cursor save */ |
3690 | case 1048: /* alternative cursor save */ |
4136 | case 1049: |
3691 | case 1049: |
4137 | if (OPTION (Opt_secondaryScreen)) |
3692 | if (option (Opt_secondaryScreen)) |
4138 | if (mode == 0) |
3693 | if (mode == 0) |
4139 | scr_cursor (RESTORE); |
3694 | scr_cursor (RESTORE); |
4140 | else if (mode == 1) |
3695 | else if (mode == 1) |
4141 | scr_cursor (SAVE); |
3696 | scr_cursor (SAVE); |
4142 | break; |
3697 | break; |
… | |
… | |
4207 | break; |
3762 | break; |
4208 | case 1011: /* scroll to bottom on key press */ |
3763 | case 1011: /* scroll to bottom on key press */ |
4209 | set_option (Opt_scrollTtyKeypress, state); |
3764 | set_option (Opt_scrollTtyKeypress, state); |
4210 | break; |
3765 | break; |
4211 | case 1047: /* secondary screen w/ clearing last */ |
3766 | case 1047: /* secondary screen w/ clearing last */ |
4212 | if (OPTION (Opt_secondaryScreen)) |
3767 | if (option (Opt_secondaryScreen)) |
4213 | if (current_screen != PRIMARY) |
3768 | if (current_screen != PRIMARY) |
4214 | scr_erase_screen (2); |
3769 | scr_erase_screen (2); |
4215 | scr_change_screen (state); |
3770 | scr_change_screen (state); |
4216 | break; |
3771 | break; |
4217 | case 1049: /* secondary screen w/ clearing first */ |
3772 | case 1049: /* secondary screen w/ clearing first */ |
4218 | scr_change_screen (state); |
3773 | scr_change_screen (state); |
4219 | if (OPTION (Opt_secondaryScreen)) |
3774 | if (option (Opt_secondaryScreen)) |
4220 | if (current_screen != PRIMARY) |
3775 | if (current_screen != PRIMARY) |
4221 | scr_erase_screen (2); |
3776 | scr_erase_screen (2); |
4222 | break; |
3777 | break; |
4223 | default: |
3778 | default: |
4224 | break; |
3779 | break; |