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.334 by ayin, Tue Jun 26 13:05:05 2007 UTC vs.
Revision 1.345 by sasha, Mon Aug 13 22:41:34 2007 UTC

519# endif 519# endif
520 return; 520 return;
521 } 521 }
522 else 522 else
523 { 523 {
524# if ENABLE_OVERLAY 524# if ISO_14755
525 scr_overlay_off (); 525 scr_overlay_off ();
526# endif 526# endif
527 iso14755buf = 0; 527 iso14755buf = 0;
528 } 528 }
529 } 529 }
530 else if ((ctrl && (keysym == XK_Shift_L || keysym == XK_Shift_R)) 530 else if ((ctrl && (keysym == XK_Shift_L || keysym == XK_Shift_R))
531 || (shft && (keysym == XK_Control_L || keysym == XK_Control_R))) 531 || (shft && (keysym == XK_Control_L || keysym == XK_Control_R)))
532 if (!(iso14755buf & ISO_14755_STARTED)) 532 if (!(iso14755buf & ISO_14755_STARTED))
533 { 533 {
534 iso14755buf |= ISO_14755_STARTED; 534 iso14755buf |= ISO_14755_STARTED;
535# if ENABLE_OVERLAY 535# if ISO_14755
536 scr_overlay_new (0, -1, sizeof ("ISO 14755 mode") - 1, 1); 536 scr_overlay_new (0, -1, sizeof ("ISO 14755 mode") - 1, 1);
537 scr_overlay_set (0, 0, "ISO 14755 mode"); 537 scr_overlay_set (0, 0, "ISO 14755 mode");
538# endif 538# endif
539 } 539 }
540#endif 540#endif
728 728
729 case XK_Find: 729 case XK_Find:
730 strcpy (kbuf, "\033[1~"); 730 strcpy (kbuf, "\033[1~");
731 break; 731 break;
732 732
733#ifdef XK_KP_End 733#ifdef XK_KP_Insert
734 case XK_KP_Insert: 734 case XK_KP_Insert:
735 /* allow shift to override */ 735 /* allow shift to override */
736 if ((priv_modes & PrivMode_aplKP) ? !shft : shft) 736 if ((priv_modes & PrivMode_aplKP) ? !shft : shft)
737 { 737 {
738 strcpy (kbuf, "\033Op"); 738 strcpy (kbuf, "\033Op");
934#if ENABLE_FRILLS || ISO_14755 934#if ENABLE_FRILLS || ISO_14755
935 // ISO 14755 support 935 // ISO 14755 support
936 if (iso14755buf) 936 if (iso14755buf)
937 if (iso14755buf & ISO_14755_52) 937 if (iso14755buf & ISO_14755_52)
938 { 938 {
939# if ENABLE_OVERLAY 939# if ISO_14755
940 scr_overlay_off (); 940 scr_overlay_off ();
941# endif 941# endif
942# if ISO_14755 942# if ISO_14755
943 // iso14755 part 5.2 handling: release time 943 // iso14755 part 5.2 handling: release time
944 // first: controls 944 // first: controls
967 967
968 return; 968 return;
969 } 969 }
970 else if ((ev.state & (ShiftMask | ControlMask)) != (ShiftMask | ControlMask)) 970 else if ((ev.state & (ShiftMask | ControlMask)) != (ShiftMask | ControlMask))
971 { 971 {
972# if ENABLE_OVERLAY 972# if ISO_14755
973 scr_overlay_off (); 973 scr_overlay_off ();
974# endif 974# endif
975 if (iso14755buf & ISO_14755_51) 975 if (iso14755buf & ISO_14755_51)
976 commit_iso14755 (); 976 commit_iso14755 ();
977#if ISO_14755 977#if ISO_14755
1433 else if (ev.xclient.data.l[1] == XEMBED_FOCUS_OUT) 1433 else if (ev.xclient.data.l[1] == XEMBED_FOCUS_OUT)
1434 focus_out (); 1434 focus_out ();
1435 } 1435 }
1436#endif 1436#endif
1437 } 1437 }
1438 break;
1439
1440 case MappingNotify:
1441 XRefreshKeyboardMapping (&ev.xmapping);
1442 break; 1438 break;
1443 1439
1444 /* 1440 /*
1445 * XXX: this is not the _current_ arrangement 1441 * XXX: this is not the _current_ arrangement
1446 * Here's my conclusion: 1442 * Here's my conclusion:
1489 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) 1485 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height)
1490 { 1486 {
1491 seen_resize = 1; 1487 seen_resize = 1;
1492 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); 1488 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1);
1493#ifdef XPM_BACKGROUND 1489#ifdef XPM_BACKGROUND
1490 /* TODO: replace with update_pixmap() that should unify transparency and bg image handling ! */
1494 if (!option (Opt_transparent) && bgPixmap.auto_resize) 1491 if (!option (Opt_transparent) && bgPixmap.window_size_sensitive ())
1495 { 1492 {
1496 resize_pixmap (); 1493 bgPixmap.render ();
1497 scr_touch (true); 1494 scr_touch (true);
1498 } 1495 }
1499#endif 1496#endif
1500 } 1497 }
1501 1498
1502 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); 1499 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END));
1503 1500
1504#ifdef ENABLE_TRANSPARENCY 1501#ifdef ENABLE_TRANSPARENCY
1505 if (option (Opt_transparent)) 1502 if (option (Opt_transparent))
1506 check_our_parents (); 1503 bgPixmap.render ();
1507#endif 1504#endif
1508 } 1505 }
1509 break; 1506 break;
1510 1507
1511 case PropertyNotify: 1508 case PropertyNotify:
1580 if (isScrollbarWindow (ev.xany.window)) 1577 if (isScrollbarWindow (ev.xany.window))
1581 { 1578 {
1582 scrollBar.setIdle (); 1579 scrollBar.setIdle ();
1583 scrollbar_show (0); 1580 scrollbar_show (0);
1584 } 1581 }
1585
1586#ifdef ENABLE_TRANSPARENCY
1587 if (am_transparent && ev.xany.window == parent[0])
1588 XClearWindow (dpy, ev.xany.window);
1589#endif
1590 } 1582 }
1591 break; 1583 break;
1592 1584
1593 case MotionNotify: 1585 case MotionNotify:
1594#ifdef POINTER_BLANK 1586#ifdef POINTER_BLANK
1783 1775
1784#if ENABLE_FRILLS || ISO_14755 1776#if ENABLE_FRILLS || ISO_14755
1785 if (iso14755buf) 1777 if (iso14755buf)
1786 { 1778 {
1787 iso14755buf = 0; 1779 iso14755buf = 0;
1788# if ENABLE_OVERLAY 1780# if ISO_14755
1789 scr_overlay_off (); 1781 scr_overlay_off ();
1790# endif 1782# endif
1791 } 1783 }
1792#endif 1784#endif
1793#if USE_XIM 1785#if USE_XIM
1838 case PropertyNotify: 1830 case PropertyNotify:
1839 /* 1831 /*
1840 * if user used some Esetroot compatible prog to set the root bg, 1832 * if user used some Esetroot compatible prog to set the root bg,
1841 * use the property to determine the pixmap. We use it later on. 1833 * use the property to determine the pixmap. We use it later on.
1842 */ 1834 */
1843 if (ev.xproperty.atom != xa[XA_XROOTPMAP_ID] 1835 if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID]
1844 && ev.xproperty.atom != xa[XA_ESETROOT_PMAP_ID]) 1836 || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID])
1845 return; 1837 {
1846 1838 bgPixmap.set_root_pixmap ();
1847 /* FALLTHROUGH */ 1839 bgPixmap.render ();
1848 case ReparentNotify: 1840 }
1849 if (option (Opt_transparent))
1850 check_our_parents ();
1851 break; 1841 break;
1852 } 1842 }
1853# endif 1843# endif
1854} 1844}
1855#endif 1845#endif
2812 unicode_t ch, priv, i; 2802 unicode_t ch, priv, i;
2813 unsigned int nargs, p; 2803 unsigned int nargs, p;
2814 int n, ndef; 2804 int n, ndef;
2815 int arg[ESC_ARGS]; 2805 int arg[ESC_ARGS];
2816 2806
2817 for (nargs = ESC_ARGS; nargs > 0;) 2807 memset (arg, 0, sizeof (arg));
2818 arg[--nargs] = 0; 2808 nargs = 0;
2819 2809
2820 priv = 0; 2810 priv = 0;
2821 ch = cmd_getc (); 2811 ch = cmd_getc ();
2822 if (ch >= '<' && ch <= '?') 2812 if (ch >= '<' && ch <= '?')
2823 { /* '<' '=' '>' '?' */ 2813 { /* '<' '=' '>' '?' */
3435 break; 3425 break;
3436 case URxvt_Color_IT: 3426 case URxvt_Color_IT:
3437 process_color_seq (op, Color_IT, str, resp); 3427 process_color_seq (op, Color_IT, str, resp);
3438 break; 3428 break;
3439#endif 3429#endif
3440#if ENABLE_TRANSPARENCY && TINTING 3430#if ENABLE_TRANSPARENCY
3441 case URxvt_Color_tint: 3431 case URxvt_Color_tint:
3442 process_color_seq (op, Color_tint, str, resp); 3432 process_color_seq (op, Color_tint, str, resp);
3433 {
3434 bool changed = false;
3435 if (ISSET_PIXCOLOR (Color_tint))
3436 changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]);
3437 else
3438 changed = bgPixmap.unset_tint ();
3439 if (changed)
3440 bgPixmap.render ();
3441 }
3443 3442
3444 check_our_parents ();
3445
3446 if (am_transparent)
3447 want_full_refresh = want_refresh = 1;
3448
3449 break; 3443 break;
3450#endif 3444#endif
3451 3445
3446#if XPM_BACKGROUND
3452 case Rxvt_Pixmap: 3447 case Rxvt_Pixmap:
3448 if (!strcmp (str, "?"))
3453 { 3449 {
3450 char str[256];
3451
3452 sprintf (str, "[%dx%d+%d+%d]", /* can't presume snprintf () ! */
3453 min (bgPixmap.h_scale, 32767), min (bgPixmap.v_scale, 32767),
3454 min (bgPixmap.h_align, 32767), min (bgPixmap.v_align, 32767));
3455 process_xterm_seq (XTerm_title, str, CHAR_ST);
3456 }
3457 else
3458 {
3459 int changed = 0;
3460
3454 if (*str != ';') 3461 if (*str != ';')
3455 { 3462 {
3456#if XPM_BACKGROUND
3457 scale_pixmap (""); /* reset to default scaling */ 3463 /* reset to default scaling :*/
3464 bgPixmap.unset_geometry ();
3458 set_bgPixmap (str); /* change pixmap */ 3465 if (bgPixmap.set_file (str)) /* change pixmap */
3466 changed++;
3467 str = strchr (str, ';');
3468 if (str == NULL)
3469 bgPixmap.set_defaultGeometry ();
3470 }
3471 while (str)
3472 {
3473 str++;
3474 if (bgPixmap.set_geometry (str))
3475 changed++;
3476 str = strchr (str, ';');
3477 }
3478 if (changed)
3479 {
3480 bgPixmap.render ();
3459 scr_touch (true); 3481 scr_touch (true);
3460#endif
3461 } 3482 }
3462
3463 int changed = 0;
3464
3465 while ((str = strchr (str, ';')) != NULL)
3466 {
3467 str++;
3468#if XPM_BACKGROUND
3469 changed += scale_pixmap (str);
3470#endif
3471 } 3483 }
3472
3473 if (changed)
3474 {
3475#ifdef XPM_BACKGROUND
3476 resize_pixmap ();
3477 scr_touch (true);
3478#endif
3479 }
3480#if ENABLE_TRANSPARENCY && defined(HAVE_AFTERIMAGE)
3481 if (option (Opt_transparent))
3482 check_our_parents ();
3483#endif
3484 }
3485 break; 3484 break;
3485#endif
3486 3486
3487 case Rxvt_restoreFG: 3487 case Rxvt_restoreFG:
3488 set_window_color (Color_fg, str); 3488 set_window_color (Color_fg, str);
3489 break; 3489 break;
3490 case Rxvt_restoreBG: 3490 case Rxvt_restoreBG:
3612{ 3612{
3613 unsigned int i, j; 3613 unsigned int i, j;
3614 int state; 3614 int state;
3615 3615
3616 static const struct 3616 static const struct
3617 { 3617 {
3618 const int argval; 3618 const int argval;
3619 const unsigned long bit; 3619 const unsigned long bit;
3620 }
3621
3622 argtopriv[] = { 3620 } argtopriv[] = {
3623 { 1, PrivMode_aplCUR }, 3621 { 1, PrivMode_aplCUR },
3624 { 2, PrivMode_vt52 }, 3622 { 2, PrivMode_vt52 },
3625 { 3, PrivMode_132 }, 3623 { 3, PrivMode_132 },
3626 { 4, PrivMode_smoothScroll }, 3624 { 4, PrivMode_smoothScroll },
3627 { 5, PrivMode_rVideo }, 3625 { 5, PrivMode_rVideo },

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines