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.255 by root, Wed Jan 11 03:13:26 2006 UTC vs.
Revision 1.259 by root, Fri Jan 13 04:59:04 2006 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines