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.248 by root, Sun Jan 8 00:07:18 2006 UTC vs.
Revision 1.252 by root, Mon Jan 9 22:41:41 2006 UTC

867#endif 867#endif
868 /* nil */ ; 868 /* nil */ ;
869 } 869 }
870 } 870 }
871 871
872 if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_STR_LEN, kbuf, len, DT_END))) 872 if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_INT, keysym, DT_STR_LEN, kbuf, len, DT_END)))
873 return; 873 return;
874 874
875 if (len <= 0) 875 if (len <= 0)
876 return; /* not mapped */ 876 return; /* not mapped */
877 877
973 if (want_refresh) 973 if (want_refresh)
974 { 974 {
975 if (SHOULD_INVOKE (HOOK_LINE_UPDATE)) 975 if (SHOULD_INVOKE (HOOK_LINE_UPDATE))
976 { 976 {
977 int row = -view_start; 977 int row = -view_start;
978 int end_row = row + nrow;
978 979
979 while (row > -nsaved && ROW (row - 1).is_longer ()) 980 while (row > -nsaved && ROW (row - 1).is_longer ())
980 --row; 981 --row;
981 982
982 while (row < -view_start + nrow) 983 do
983 { 984 {
984 int start_row = row; 985 int start_row = row;
985 line_t *l; 986 line_t *l;
986 987
987 do 988 do
988 { 989 {
989 l = &ROW (row); 990 l = &ROW (row++);
990 991
991 if (!(l->f & LINE_FILTERED)) 992 if (l->f & LINE_FILTERED)
993 row++;
994 else
992 { 995 {
993 // line not filtered, mark it as filtered 996 // line not filtered, mark it as filtered
994 l->f |= LINE_FILTERED; 997 l->f |= LINE_FILTERED;
995 while (l->is_longer ()) 998 while (l->is_longer ())
996 { 999 {
1002 HOOK_INVOKE ((this, HOOK_LINE_UPDATE, DT_INT, start_row, DT_END)); 1005 HOOK_INVOKE ((this, HOOK_LINE_UPDATE, DT_INT, start_row, DT_END));
1003 1006
1004 break; 1007 break;
1005 } 1008 }
1006 } 1009 }
1007 while (l->is_longer ()); 1010 while (l->is_longer () && row < end_row);
1008
1009 row++;
1010 } 1011 }
1011 1012 while (++row < end_row);
1012 } 1013 }
1013 1014
1014 scr_refresh (refresh_type); 1015 scr_refresh (refresh_type);
1015 scrollbar_show (1); 1016 scrollbar_show (1);
1016#ifdef USE_XIM 1017#ifdef USE_XIM
1328 1329
1329 break; 1330 break;
1330 1331
1331 case KeyRelease: 1332 case KeyRelease:
1332 { 1333 {
1333#if (MOUSE_WHEEL && MOUSE_SLIP_WHEELING) || ISO_14755 1334#if (MOUSE_WHEEL && MOUSE_SLIP_WHEELING) || ISO_14755 || ENABLE_PERL
1334 KeySym ks; 1335 KeySym keysym;
1335 1336
1336 ks = XLookupKeysym (&ev.xkey, ev.xkey.state & ShiftMask ? 1 : 0); // sorry, only shift supported :/ 1337 keysym = XLookupKeysym (&ev.xkey, ev.xkey.state & ShiftMask ? 1 : 0); // sorry, only shift supported :/
1337#endif 1338#endif
1338 1339
1339#if ENABLE_FRILLS || ISO_14755 1340#if ENABLE_FRILLS || ISO_14755
1340 // ISO 14755 support 1341 // ISO 14755 support
1341 if (iso14755buf) 1342 if (iso14755buf)
1346# endif 1347# endif
1347# if ISO_14755 1348# if ISO_14755
1348 // iso14755 part 5.2 handling: release time 1349 // iso14755 part 5.2 handling: release time
1349 // first: controls 1350 // first: controls
1350 if ((ev.xkey.state & ControlMask) 1351 if ((ev.xkey.state & ControlMask)
1351 && ((ks >= 0x40 && ks <= 0x5f) 1352 && ((keysym >= 0x40 && keysym <= 0x5f)
1352 || (ks >= 0x61 && ks <= 0x7f))) 1353 || (keysym >= 0x61 && keysym <= 0x7f)))
1353 { 1354 {
1354 iso14755buf = ISO_14755_51 | 0x2400 | (ks & 0x1f); 1355 iso14755buf = ISO_14755_51 | 0x2400 | (keysym & 0x1f);
1355 commit_iso14755 (); 1356 commit_iso14755 ();
1356 goto skip_switch; 1357 goto skip_switch;
1357 } 1358 }
1358 1359
1359 for (unsigned short *i = iso14755_symtab; i[0]; i+= 2) 1360 for (unsigned short *i = iso14755_symtab; i[0]; i+= 2)
1360 if (i[0] == ks) 1361 if (i[0] == keysym)
1361 { 1362 {
1362 iso14755buf = ISO_14755_51 | i[1]; 1363 iso14755buf = ISO_14755_51 | i[1];
1363 commit_iso14755 (); 1364 commit_iso14755 ();
1364 goto skip_switch; 1365 goto skip_switch;
1365 } 1366 }
1389 iso14755buf = 0; 1390 iso14755buf = 0;
1390 } 1391 }
1391#endif 1392#endif
1392 1393
1393 if (ev.xany.window == vt 1394 if (ev.xany.window == vt
1394 && HOOK_INVOKE ((this, HOOK_KEY_RELEASE, DT_XEVENT, &ev, DT_END))) 1395 && HOOK_INVOKE ((this, HOOK_KEY_RELEASE, DT_XEVENT, &ev, DT_INT, keysym, DT_END)))
1395 break; 1396 break;
1396 1397
1397#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) 1398#if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING)
1398 if (!(ev.xkey.state & ControlMask)) 1399 if (!(ev.xkey.state & ControlMask))
1399 slip_wheel_ev.stop (); 1400 slip_wheel_ev.stop ();
1400 else if (ks == XK_Control_L || ks == XK_Control_R) 1401 else if (keysym == XK_Control_L || keysym == XK_Control_R)
1401 mouse_slip_wheel_speed = 0; 1402 mouse_slip_wheel_speed = 0;
1402#endif 1403#endif
1403 break; 1404 break;
1404 } 1405 }
1405 1406
4155 /* extra handling for values with state unkept */ 4156 /* extra handling for values with state unkept */
4156 switch (arg[i]) 4157 switch (arg[i])
4157 { 4158 {
4158#if ENABLE_STYLES 4159#if ENABLE_STYLES
4159 case 1021: 4160 case 1021:
4160 if (mode) 4161 set_option (Opt_intensityStyles, mode);
4161 SET_OPTION (Opt_intensityStyles);
4162 else
4163 CLR_OPTION (Opt_intensityStyles);
4164 4162
4165 scr_touch (true); 4163 scr_touch (true);
4166 break; 4164 break;
4167#endif 4165#endif
4168 case 1048: /* alternative cursor save */ 4166 case 1048: /* alternative cursor save */
4190 case 3: /* 80/132 */ 4188 case 3: /* 80/132 */
4191 if (priv_modes & PrivMode_132OK) 4189 if (priv_modes & PrivMode_132OK)
4192 set_widthheight (((state ? 132 : 80) * fwidth), height); 4190 set_widthheight (((state ? 132 : 80) * fwidth), height);
4193 break; 4191 break;
4194 case 4: /* smooth scrolling */ 4192 case 4: /* smooth scrolling */
4195 if (!state) 4193 set_option (Opt_jumpScroll, !state);
4196 SET_OPTION (Opt_jumpScroll);
4197 else
4198 CLR_OPTION (Opt_jumpScroll);
4199 break; 4194 break;
4200 case 5: /* reverse video */ 4195 case 5: /* reverse video */
4201 scr_rvideo_mode (state); 4196 scr_rvideo_mode (state);
4202 break; 4197 break;
4203 case 6: /* relative/absolute origins */ 4198 case 6: /* relative/absolute origins */
4244#if 0 4239#if 0
4245 case 1001: 4240 case 1001:
4246 break; /* X11 mouse highlighting */ 4241 break; /* X11 mouse highlighting */
4247#endif 4242#endif
4248 case 1010: /* scroll to bottom on TTY output inhibit */ 4243 case 1010: /* scroll to bottom on TTY output inhibit */
4249 if (!state) 4244 set_option (Opt_scrollTtyOutput, !state);
4250 SET_OPTION (Opt_scrollTtyOutput);
4251 else
4252 CLR_OPTION (Opt_scrollTtyOutput);
4253 break; 4245 break;
4254 case 1011: /* scroll to bottom on key press */ 4246 case 1011: /* scroll to bottom on key press */
4255 if (state) 4247 set_option (Opt_scrollTtyKeypress, state);
4256 SET_OPTION (Opt_scrollTtyKeypress);
4257 else
4258 CLR_OPTION (Opt_scrollTtyKeypress);
4259 break; 4248 break;
4260 case 1047: /* secondary screen w/ clearing last */ 4249 case 1047: /* secondary screen w/ clearing last */
4261 if (OPTION (Opt_secondaryScreen)) 4250 if (OPTION (Opt_secondaryScreen))
4262 if (current_screen != PRIMARY) 4251 if (current_screen != PRIMARY)
4263 scr_erase_screen (2); 4252 scr_erase_screen (2);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines