ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.254 by root, Wed Jan 11 02:13:56 2006 UTC vs.
Revision 1.260 by root, Fri Jan 13 05:04:33 2006 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines