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