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.442 by sf-exg, Wed Mar 31 09:37:20 2010 UTC vs.
Revision 1.446 by root, Fri Apr 2 19:27:38 2010 UTC

198 198
199 int width = 0; 199 int width = 0;
200 fname = rxvt_temp_buf<wchar_t *> (len); 200 fname = rxvt_temp_buf<wchar_t *> (len);
201 for (int i = 0; i < len; i++) 201 for (int i = 0; i < len; i++)
202 { 202 {
203 rxvt_font *f = (*fs)[fs->find_font (chr[i])]; 203 rxvt_font *f = (*fs)[fs->find_font_idx (chr[i])];
204 fname[i] = rxvt_utf8towcs (f->name); 204 fname[i] = rxvt_utf8towcs (f->name);
205 max_it (width, wcswidth (fname[i], wcslen (fname[i]))); 205 max_it (width, wcswidth (fname[i], wcslen (fname[i])));
206 } 206 }
207 207
208 max_it (width, 8+5); // for char + hex 208 max_it (width, 8+5); // for char + hex
421 * Always permit `shift' to override the current setting 421 * Always permit `shift' to override the current setting
422 */ 422 */
423 shft = ev.state & ShiftMask; 423 shft = ev.state & ShiftMask;
424 ctrl = ev.state & ControlMask; 424 ctrl = ev.state & ControlMask;
425 meta = ev.state & ModMetaMask; 425 meta = ev.state & ModMetaMask;
426
427 if (numlock_state || (ev.state & ModNumLockMask))
428 {
429 numlock_state = (ev.state & ModNumLockMask);
430 set_privmode (PrivMode_aplKP, !numlock_state);
431 }
432 426
433 kbuf[0] = 0; 427 kbuf[0] = 0;
434 428
435#ifdef USE_XIM 429#ifdef USE_XIM
436 if (Input_Context) 430 if (Input_Context)
653 if (keysym >= 0xFF00 && keysym <= 0xFFFF) 647 if (keysym >= 0xFF00 && keysym <= 0xFFFF)
654 { 648 {
655 bool kp = priv_modes & PrivMode_aplKP ? !shft : shft; 649 bool kp = priv_modes & PrivMode_aplKP ? !shft : shft;
656 unsigned int newlen = 1; 650 unsigned int newlen = 1;
657 651
652 if (ev.state & ModNumLockMask)
653 kp = false;
654
658 switch (translate_keypad (keysym, kp)) 655 keysym = translate_keypad (keysym, kp);
656
657 switch (keysym)
659 { 658 {
660#ifndef NO_BACKSPACE_KEY 659#ifndef NO_BACKSPACE_KEY
661 case XK_BackSpace: 660 case XK_BackSpace:
662 if (priv_modes & PrivMode_HaveBackSpace) 661 if (priv_modes & PrivMode_HaveBackSpace)
663 { 662 {
1033 } 1032 }
1034 1033
1035 display->flush (); 1034 display->flush ();
1036} 1035}
1037 1036
1038/* checks wether a refresh is requested and starts the refresh timer */ 1037/* checks whether a refresh is requested and starts the refresh timer */
1039void 1038void
1040rxvt_term::refresh_check () 1039rxvt_term::refresh_check ()
1041{ 1040{
1042 if (want_refresh && !flush_ev.is_active ()) 1041 if (want_refresh && !flush_ev.is_active ())
1043 flush_ev.start (1. / 60.); // refresh at max. 60 Hz normally 1042 flush_ev.start (1. / 60.); // refresh at max. 60 Hz normally

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines