… | |
… | |
985 | int start_row = row; |
985 | int start_row = row; |
986 | line_t *l; |
986 | line_t *l; |
987 | |
987 | |
988 | do |
988 | do |
989 | { |
989 | { |
990 | l = &ROW (row); |
990 | l = &ROW (row++); |
991 | |
991 | |
992 | if (l->f & LINE_FILTERED) |
992 | if (!(l->f & LINE_FILTERED)) |
993 | row++; |
|
|
994 | else |
|
|
995 | { |
993 | { |
996 | // line not filtered, mark it as filtered |
994 | // line not filtered, mark it as filtered |
997 | l->f |= LINE_FILTERED; |
995 | l->f |= LINE_FILTERED; |
998 | while (l->is_longer ()) |
996 | while (l->is_longer ()) |
999 | { |
997 | { |
1000 | l = &ROW (++row); |
998 | l = &ROW (row++); |
1001 | l->f |= LINE_FILTERED; |
999 | l->f |= LINE_FILTERED; |
1002 | } |
1000 | } |
1003 | |
1001 | |
1004 | // and filter it |
1002 | // and filter it |
1005 | HOOK_INVOKE ((this, HOOK_LINE_UPDATE, DT_INT, start_row, DT_END)); |
1003 | HOOK_INVOKE ((this, HOOK_LINE_UPDATE, DT_INT, start_row, DT_END)); |
… | |
… | |
1007 | break; |
1005 | break; |
1008 | } |
1006 | } |
1009 | } |
1007 | } |
1010 | while (l->is_longer () && row < end_row); |
1008 | while (l->is_longer () && row < end_row); |
1011 | } |
1009 | } |
1012 | while (++row < end_row); |
1010 | while (row < end_row); |
1013 | } |
1011 | } |
1014 | |
1012 | |
1015 | scr_refresh (refresh_type); |
1013 | scr_refresh (refresh_type); |
1016 | scrollbar_show (1); |
1014 | scrollbar_show (1); |
1017 | #ifdef USE_XIM |
1015 | #ifdef USE_XIM |
… | |
… | |
1312 | { |
1310 | { |
1313 | dDisp; |
1311 | dDisp; |
1314 | |
1312 | |
1315 | SET_R (this); |
1313 | SET_R (this); |
1316 | SET_LOCALE (locale); |
1314 | SET_LOCALE (locale); |
|
|
1315 | |
|
|
1316 | if (ev.xany.window == vt |
|
|
1317 | && HOOK_INVOKE ((this, HOOK_X_EVENT, DT_XEVENT, &ev, DT_END))) |
|
|
1318 | return; |
1317 | |
1319 | |
1318 | Window unused_root, unused_child; |
1320 | Window unused_root, unused_child; |
1319 | int unused_root_x, unused_root_y; |
1321 | int unused_root_x, unused_root_y; |
1320 | unsigned int unused_mask; |
1322 | unsigned int unused_mask; |
1321 | |
1323 | |
… | |
… | |
1602 | #endif |
1604 | #endif |
1603 | } |
1605 | } |
1604 | break; |
1606 | break; |
1605 | |
1607 | |
1606 | case MotionNotify: |
1608 | case MotionNotify: |
|
|
1609 | printf ("motion notify\n");//D |
1607 | #ifdef POINTER_BLANK |
1610 | #ifdef POINTER_BLANK |
1608 | if (hidden_pointer) |
1611 | if (hidden_pointer) |
1609 | pointer_unblank (); |
1612 | pointer_unblank (); |
1610 | #endif |
1613 | #endif |
1611 | #if MENUBAR |
1614 | #if MENUBAR |
… | |
… | |
1922 | #else |
1925 | #else |
1923 | selection.rect = false; |
1926 | selection.rect = false; |
1924 | #endif |
1927 | #endif |
1925 | |
1928 | |
1926 | /* allow shift+left click to extend selection */ |
1929 | /* allow shift+left click to extend selection */ |
1927 | if (ev.state & ShiftMask && ! (priv_modes & PrivMode_mouse_report)) |
1930 | if (ev.state & ShiftMask && !(priv_modes & PrivMode_mouse_report)) |
1928 | { |
1931 | { |
1929 | if (MEvent.button == Button1 && clickintime) |
1932 | if (MEvent.button == Button1 && clickintime) |
1930 | selection_rotate (ev.x, ev.y); |
1933 | selection_rotate (ev.x, ev.y); |
1931 | else |
1934 | else |
1932 | selection_extend (ev.x, ev.y, 1); |
1935 | selection_extend (ev.x, ev.y, 1); |
… | |
… | |
3860 | { |
3863 | { |
3861 | if ((name = strchr (buf, ';')) == NULL) |
3864 | if ((name = strchr (buf, ';')) == NULL) |
3862 | break; |
3865 | break; |
3863 | |
3866 | |
3864 | *name++ = '\0'; |
3867 | *name++ = '\0'; |
3865 | color = atoi (buf); |
3868 | color = atoi (buf) + minCOLOR; |
3866 | |
3869 | |
3867 | if (color < 0 || color >= TOTAL_COLORS) |
3870 | if (!IN_RANGE_INC (color, minCOLOR, maxTermCOLOR)) |
3868 | break; |
3871 | break; |
3869 | |
3872 | |
3870 | if ((buf = strchr (name, ';')) != NULL) |
3873 | if ((buf = strchr (name, ';')) != NULL) |
3871 | *buf++ = '\0'; |
3874 | *buf++ = '\0'; |
3872 | |
3875 | |
3873 | if (name[0] == '?' && !name[1]) |
3876 | if (name[0] == '?' && !name[1]) |
3874 | { |
3877 | { |
3875 | unsigned short r, g, b; |
3878 | unsigned short r, g, b; |
3876 | pix_colors_focused[color + minCOLOR].get (display, r, g, b); |
3879 | pix_colors_focused[color].get (display, r, g, b); |
3877 | tt_printf ("\033]%d;%d;rgb:%04x/%04x/%04x%c", XTerm_Color, color, r, g, b, resp); |
3880 | tt_printf ("\033]%d;%d;rgb:%04x/%04x/%04x%c", XTerm_Color, color, r, g, b, resp); |
3878 | } |
3881 | } |
3879 | else |
3882 | else |
3880 | set_window_color (color + minCOLOR, name); |
3883 | set_window_color (color, name); |
3881 | } |
3884 | } |
3882 | break; |
3885 | break; |
3883 | case XTerm_Color00: |
3886 | case XTerm_Color00: |
3884 | process_color_seq (XTerm_Color00, Color_fg, str, resp); |
3887 | process_color_seq (XTerm_Color00, Color_fg, str, resp); |
3885 | break; |
3888 | break; |
3886 | case XTerm_Color01: |
3889 | case XTerm_Color01: |
3887 | process_color_seq (XTerm_Color00, Color_bg, str, resp); |
3890 | process_color_seq (XTerm_Color01, Color_bg, str, resp); |
3888 | break; |
3891 | break; |
3889 | #ifndef NO_CURSORCOLOR |
3892 | #ifndef NO_CURSORCOLOR |
3890 | case XTerm_Color_cursor: |
3893 | case XTerm_Color_cursor: |
3891 | process_color_seq (XTerm_Color_cursor, Color_cursor, str, resp); |
3894 | process_color_seq (XTerm_Color_cursor, Color_cursor, str, resp); |
3892 | break; |
3895 | break; |
… | |
… | |
3896 | break; |
3899 | break; |
3897 | case XTerm_Color_pointer_bg: |
3900 | case XTerm_Color_pointer_bg: |
3898 | process_color_seq (XTerm_Color_pointer_bg, Color_pointer_bg, str, resp); |
3901 | process_color_seq (XTerm_Color_pointer_bg, Color_pointer_bg, str, resp); |
3899 | break; |
3902 | break; |
3900 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
3903 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
3901 | case XTerm_Color_BD: |
|
|
3902 | process_color_seq (XTerm_Color_BD, Color_BD, str, resp); |
|
|
3903 | break; |
|
|
3904 | case XTerm_Color_UL: |
|
|
3905 | process_color_seq (XTerm_Color_UL, Color_UL, str, resp); |
|
|
3906 | break; |
|
|
3907 | case XTerm_Color_RV: |
3904 | case XTerm_Color_RV: |
3908 | process_color_seq (XTerm_Color_RV, Color_RV, str, resp); |
3905 | process_color_seq (XTerm_Color_RV, Color_RV, str, resp); |
|
|
3906 | break; |
|
|
3907 | case Rxvt_Color_BD: |
|
|
3908 | case URxvt_Color_BD: |
|
|
3909 | process_color_seq (op, Color_BD, str, resp); |
|
|
3910 | break; |
|
|
3911 | case Rxvt_Color_UL: |
|
|
3912 | case URxvt_Color_UL: |
|
|
3913 | process_color_seq (op, Color_UL, str, resp); |
3909 | break; |
3914 | break; |
3910 | case URxvt_Color_IT: |
3915 | case URxvt_Color_IT: |
3911 | process_color_seq (URxvt_Color_IT, Color_IT, str, resp); |
3916 | process_color_seq (URxvt_Color_IT, Color_IT, str, resp); |
3912 | break; |
3917 | break; |
3913 | #endif |
3918 | #endif |
… | |
… | |
3918 | if (am_transparent) |
3923 | if (am_transparent) |
3919 | want_full_refresh = want_refresh = 1; |
3924 | want_full_refresh = want_refresh = 1; |
3920 | break; |
3925 | break; |
3921 | #endif |
3926 | #endif |
3922 | |
3927 | |
3923 | case XTerm_Pixmap: |
3928 | case Rxvt_Pixmap: |
3924 | if (*str != ';') |
3929 | if (*str != ';') |
3925 | { |
3930 | { |
3926 | #if XPM_BACKGROUND |
3931 | #if XPM_BACKGROUND |
3927 | scale_pixmap (""); /* reset to default scaling */ |
3932 | scale_pixmap (""); /* reset to default scaling */ |
3928 | set_bgPixmap (str); /* change pixmap */ |
3933 | set_bgPixmap (str); /* change pixmap */ |
3929 | #endif |
|
|
3930 | scr_touch (true); |
3934 | scr_touch (true); |
|
|
3935 | #endif |
3931 | } |
3936 | } |
|
|
3937 | |
3932 | while ((str = strchr (str, ';')) != NULL) |
3938 | while ((str = strchr (str, ';')) != NULL) |
3933 | { |
3939 | { |
3934 | str++; |
3940 | str++; |
3935 | #if XPM_BACKGROUND |
3941 | #if XPM_BACKGROUND |
3936 | changed += scale_pixmap (str); |
3942 | changed += scale_pixmap (str); |
… | |
… | |
3939 | |
3945 | |
3940 | if (changed) |
3946 | if (changed) |
3941 | { |
3947 | { |
3942 | #ifdef XPM_BACKGROUND |
3948 | #ifdef XPM_BACKGROUND |
3943 | resize_pixmap (); |
3949 | resize_pixmap (); |
3944 | #endif |
|
|
3945 | scr_touch (true); |
3950 | scr_touch (true); |
|
|
3951 | #endif |
3946 | } |
3952 | } |
3947 | break; |
3953 | break; |
3948 | |
3954 | |
3949 | case XTerm_restoreFG: |
3955 | case Rxvt_restoreFG: |
3950 | set_window_color (Color_fg, str); |
3956 | set_window_color (Color_fg, str); |
3951 | break; |
3957 | break; |
3952 | case XTerm_restoreBG: |
3958 | case Rxvt_restoreBG: |
3953 | set_window_color (Color_bg, str); |
3959 | set_window_color (Color_bg, str); |
3954 | break; |
3960 | break; |
3955 | |
3961 | |
3956 | case XTerm_logfile: |
3962 | case XTerm_logfile: |
3957 | // TODO, when secure mode? |
3963 | // TODO, when secure mode? |
… | |
… | |
3962 | if (OPTION (Opt_insecure)) |
3968 | if (OPTION (Opt_insecure)) |
3963 | menubar_dispatch (const_cast<char *>(str)); // casting away constness is checked |
3969 | menubar_dispatch (const_cast<char *>(str)); // casting away constness is checked |
3964 | break; |
3970 | break; |
3965 | #endif |
3971 | #endif |
3966 | #if 0 |
3972 | #if 0 |
3967 | case XTerm_dumpscreen: /* no error notices */ |
3973 | case Rxvt_dumpscreen: /* no error notices */ |
3968 | { |
3974 | { |
3969 | int fd; |
3975 | int fd; |
3970 | if ((fd = open (str, O_RDWR | O_CREAT | O_EXCL, 0600)) >= 0) |
3976 | if ((fd = open (str, O_RDWR | O_CREAT | O_EXCL, 0600)) >= 0) |
3971 | { |
3977 | { |
3972 | scr_dump (fd); |
3978 | scr_dump (fd); |