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.448 by sf-exg, Sat Apr 17 23:00:45 2010 UTC vs.
Revision 1.453 by sf-exg, Wed Aug 18 17:45:42 2010 UTC

771 771
772 default: 772 default:
773 { 773 {
774 int param = map_function_key (keysym); 774 int param = map_function_key (keysym);
775 if (param > 0) 775 if (param > 0)
776 {
776 sprintf (kbuf,"\033[%d~", param); 777 int n = sprintf (kbuf,"\033[%d~", param);
778 /*
779 * pass Shift/Control indicators for function keys ending with `~'
780 *
781 * eg,
782 * Prior = "ESC[5~"
783 * Shift+Prior = "ESC[5$"
784 * Ctrl+Prior = "ESC[5^"
785 * Ctrl+Shift+Prior = "ESC[5@"
786 */
787 kbuf[n-1] = (shft ? (ctrl ? '@' : '$') : (ctrl ? '^' : '~'));
788 }
777 else 789 else
778 newlen = 0; 790 newlen = 0;
779 } 791 }
780 break; 792 break;
781 } 793 }
832 view_start = 0; 844 view_start = 0;
833 want_refresh = 1; 845 want_refresh = 1;
834 } 846 }
835 847
836 /* 848 /*
837 * these modifications only affect the static keybuffer
838 * pass Shift/Control indicators for function keys ending with `~'
839 *
840 * eg,
841 * Prior = "ESC[5~"
842 * Shift+Prior = "ESC[5$"
843 * Ctrl+Prior = "ESC[5^"
844 * Ctrl+Shift+Prior = "ESC[5@"
845 * Meta adds an Escape prefix (with META8_OPTION, if meta == <escape>). 849 * Meta adds an Escape prefix (with META8_OPTION, if meta == <escape>).
846 */ 850 */
847 if (kbuf[0] == C0_ESC && kbuf[1] == '[' && kbuf[len - 1] == '~')
848 kbuf[len - 1] = (shft ? (ctrl ? '@' : '$') : (ctrl ? '^' : '~'));
849 851
850 /* escape prefix */ 852 /* escape prefix */
851 if (meta 853 if (meta
852#ifdef META8_OPTION 854#ifdef META8_OPTION
853 && meta_char == C0_ESC 855 && meta_char == C0_ESC
1483 selection_send (ev.xselectionrequest); 1485 selection_send (ev.xselectionrequest);
1484 break; 1486 break;
1485 1487
1486 case MapNotify: 1488 case MapNotify:
1487#ifdef HAVE_BG_PIXMAP 1489#ifdef HAVE_BG_PIXMAP
1488 /* This is needed spcifically to fix the case of no window manager or a 1490 /* This is needed specifically to fix the case of no window manager or a
1489 * non-reparenting window manager. In those cases we never get first 1491 * non-reparenting window manager. In those cases we never get first
1490 * ConfigureNotify. Also that speeds startup under normal WM, by taking 1492 * ConfigureNotify. Also that speeds startup under normal WM, by taking
1491 * care of multiplicity of ConfigureNotify events arriwing while WM does 1493 * care of multiplicity of ConfigureNotify events arriving while WM does
1492 * reparenting. 1494 * reparenting.
1493 * We should not render background immidiately, as there could be several 1495 * We should not render background immediately, as there could be several
1494 * ConfigureNotify's to follow. Lets take care of all of them in one scoop 1496 * ConfigureNotify's to follow. Lets take care of all of them in one scoop
1495 * by scheduling background redraw as soon as we can, but giving a short 1497 * by scheduling background redraw as soon as we can, but giving a short
1496 * bit of time for ConfigureNotifies to arrive. 1498 * bit of time for ConfigureNotifies to arrive.
1497 * We should render background PRIOR to drawing any text, but AFTER all 1499 * We should render background PRIOR to drawing any text, but AFTER all
1498 * of ConfigureNotifys for the best results. 1500 * of ConfigureNotifys for the best results.
1869 /* save the xbutton state (for ButtonRelease) */ 1871 /* save the xbutton state (for ButtonRelease) */
1870 MEvent.state = ev.state; 1872 MEvent.state = ev.state;
1871#ifdef MOUSE_REPORT_DOUBLECLICK 1873#ifdef MOUSE_REPORT_DOUBLECLICK
1872 if (ev.button == MEvent.button && clickintime) 1874 if (ev.button == MEvent.button && clickintime)
1873 { 1875 {
1874 /* same button, within alloted time */ 1876 /* same button, within allowed time */
1875 MEvent.clicks++; 1877 MEvent.clicks++;
1876 1878
1877 if (MEvent.clicks > 1) 1879 if (MEvent.clicks > 1)
1878 { 1880 {
1879 /* only report double clicks */ 1881 /* only report double clicks */
3231 * process DEVICE CONTROL STRING `ESC P ... (ST|BEL)' or `0x90 ... (ST|BEL)' 3233 * process DEVICE CONTROL STRING `ESC P ... (ST|BEL)' or `0x90 ... (ST|BEL)'
3232 */ 3234 */
3233void 3235void
3234rxvt_term::process_dcs_seq () 3236rxvt_term::process_dcs_seq ()
3235{ 3237{
3236 char *s;
3237 unicode_t eh;
3238
3239 /* 3238 /*
3240 * Not handled yet 3239 * Not handled yet
3241 */ 3240 */
3241
3242 unicode_t eh;
3242 s = get_to_st (eh); 3243 char *s = get_to_st (eh);
3243 if (s) 3244 if (s)
3244 free (s); 3245 free (s);
3245 3246
3246 return; 3247 return;
3247} 3248}
3251 * process OPERATING SYSTEM COMMAND sequence `ESC ] Ps ; Pt (ST|BEL)' 3252 * process OPERATING SYSTEM COMMAND sequence `ESC ] Ps ; Pt (ST|BEL)'
3252 */ 3253 */
3253void 3254void
3254rxvt_term::process_osc_seq () 3255rxvt_term::process_osc_seq ()
3255{ 3256{
3256 unicode_t ch, eh;
3257 int arg; 3257 int arg;
3258 3258
3259 ch = cmd_getc (); 3259 unicode_t ch = cmd_getc ();
3260 for (arg = 0; isdigit (ch); ch = cmd_getc ()) 3260 for (arg = 0; isdigit (ch); ch = cmd_getc ())
3261 arg = arg * 10 + (ch - '0'); 3261 arg = arg * 10 + (ch - '0');
3262 3262
3263 if (ch == ';') 3263 if (ch == ';')
3264 { 3264 {
3265 unicode_t eh;
3265 char *s = get_to_st (eh); 3266 char *s = get_to_st (eh);
3266 3267
3267 if (s) 3268 if (s)
3268 { 3269 {
3269 process_xterm_seq (arg, s, eh); 3270 process_xterm_seq (arg, s, eh);
3398 break; 3399 break;
3399#ifdef OPTION_HC 3400#ifdef OPTION_HC
3400 case XTerm_Color_HC: 3401 case XTerm_Color_HC:
3401 process_color_seq (op, Color_HC, str, resp); 3402 process_color_seq (op, Color_HC, str, resp);
3402 break; 3403 break;
3404 case XTerm_Color_HTC:
3405 process_color_seq (op, Color_HTC, str, resp);
3406 break;
3403#endif 3407#endif
3404#ifndef NO_BOLD_UNDERLINE_REVERSE 3408#ifndef NO_BOLD_UNDERLINE_REVERSE
3405 case Rxvt_Color_BD:
3406 case URxvt_Color_BD: 3409 case URxvt_Color_BD:
3407 process_color_seq (op, Color_BD, str, resp); 3410 process_color_seq (op, Color_BD, str, resp);
3408 break; 3411 break;
3409 case Rxvt_Color_UL:
3410 case URxvt_Color_UL: 3412 case URxvt_Color_UL:
3411 process_color_seq (op, Color_UL, str, resp); 3413 process_color_seq (op, Color_UL, str, resp);
3412 break; 3414 break;
3413 case URxvt_Color_IT: 3415 case URxvt_Color_IT:
3414 process_color_seq (op, Color_IT, str, resp); 3416 process_color_seq (op, Color_IT, str, resp);
3581 { 3583 {
3582 if (mode == 'r') 3584 if (mode == 'r')
3583 state = (SavedModes & bit) ? 1 : 0; /* no overlapping */ 3585 state = (SavedModes & bit) ? 1 : 0; /* no overlapping */
3584 else 3586 else
3585 state = (mode == 't') ? ! (priv_modes & bit) : mode; 3587 state = (mode == 't') ? ! (priv_modes & bit) : mode;
3588
3586 set_privmode (bit, state); 3589 set_privmode (bit, state);
3587 } 3590 }
3588 3591
3589 return state; 3592 return state;
3590} 3593}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines