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.341 by ayin, Fri Aug 3 23:15:34 2007 UTC vs.
Revision 1.348 by sasha, Thu Aug 16 21:26:20 2007 UTC

94 XK_ISO_Left_Tab, 0x21e6, 94 XK_ISO_Left_Tab, 0x21e6,
95 XK_Shift_L, 0x21e7, 95 XK_Shift_L, 0x21e7,
96 XK_Shift_R, 0x21e7, 96 XK_Shift_R, 0x21e7,
97 97
98 XK_Shift_Lock, 0x21eb, 98 XK_Shift_Lock, 0x21eb,
99 XK_ISO_Lock, 0x21eb,
100 XK_ISO_Lock, 0x21eb, 99 XK_ISO_Lock, 0x21eb,
101 XK_Caps_Lock, 0x21ec, 100 XK_Caps_Lock, 0x21ec,
102 XK_Num_Lock, 0x21ed, 101 XK_Num_Lock, 0x21ed,
103 XK_ISO_Level3_Shift, 0x21ee, 102 XK_ISO_Level3_Shift, 0x21ee,
104 XK_ISO_Level3_Lock, 0x21ef, 103 XK_ISO_Level3_Lock, 0x21ef,
1475 && ev.xfocus.mode != NotifyGrab) 1474 && ev.xfocus.mode != NotifyGrab)
1476 focus_out (); 1475 focus_out ();
1477 break; 1476 break;
1478 1477
1479 case ConfigureNotify: 1478 case ConfigureNotify:
1479/* fprintf (stderr, "ConfigureNotify for %X, parent is %X, geom is %dx%d%+d%+d, old geom was %dx%d\n",
1480 ev.xconfigure.window, parent[0], ev.xconfigure.width, ev.xconfigure.height, ev.xconfigure.x, ev.xconfigure.y,
1481 szHint.width, szHint.height);*/
1480 if (ev.xconfigure.window == parent[0]) 1482 if (ev.xconfigure.window == parent[0])
1481 { 1483 {
1482 while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev)) 1484 while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev))
1483 ; 1485 ;
1484 1486
1485 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) 1487 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height)
1486 { 1488 {
1487 seen_resize = 1; 1489 seen_resize = 1;
1488 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); 1490 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1);
1489#ifdef XPM_BACKGROUND
1490 /* TODO: replace with update_pixmap() that should unify transparency and bg image handling ! */
1491 if (!option (Opt_transparent) && bgPixmap.window_size_sensitive ())
1492 {
1493 resize_pixmap ();
1494 scr_touch (true);
1495 }
1496#endif
1497 } 1491 }
1498 1492 else
1493 {
1494#ifdef ENABLE_TRANSPARENCY
1495 if (option (Opt_transparent))
1496 update_background ();
1497#endif
1498 }
1499 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); 1499 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END));
1500
1501#ifdef ENABLE_TRANSPARENCY
1502 if (option (Opt_transparent))
1503 check_our_parents ();
1504#endif
1505 } 1500 }
1506 break; 1501 break;
1507 1502
1508 case PropertyNotify: 1503 case PropertyNotify:
1509 if (!HOOK_INVOKE ((this, HOOK_PROPERTY_NOTIFY, DT_XEVENT, &ev, DT_END))) 1504 if (!HOOK_INVOKE ((this, HOOK_PROPERTY_NOTIFY, DT_XEVENT, &ev, DT_END)))
1577 if (isScrollbarWindow (ev.xany.window)) 1572 if (isScrollbarWindow (ev.xany.window))
1578 { 1573 {
1579 scrollBar.setIdle (); 1574 scrollBar.setIdle ();
1580 scrollbar_show (0); 1575 scrollbar_show (0);
1581 } 1576 }
1582
1583#ifdef ENABLE_TRANSPARENCY
1584 if (am_transparent && ev.xany.window == parent[0])
1585 XClearWindow (dpy, ev.xany.window);
1586#endif
1587 } 1577 }
1588 break; 1578 break;
1589 1579
1590 case MotionNotify: 1580 case MotionNotify:
1591#ifdef POINTER_BLANK 1581#ifdef POINTER_BLANK
1835 case PropertyNotify: 1825 case PropertyNotify:
1836 /* 1826 /*
1837 * if user used some Esetroot compatible prog to set the root bg, 1827 * if user used some Esetroot compatible prog to set the root bg,
1838 * use the property to determine the pixmap. We use it later on. 1828 * use the property to determine the pixmap. We use it later on.
1839 */ 1829 */
1840 if (ev.xproperty.atom != xa[XA_XROOTPMAP_ID] 1830 if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID]
1841 && ev.xproperty.atom != xa[XA_ESETROOT_PMAP_ID]) 1831 || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID])
1842 return; 1832 {
1843 1833 bgPixmap.set_root_pixmap ();
1844 /* FALLTHROUGH */ 1834 update_background ();
1845 case ReparentNotify: 1835 }
1846 if (option (Opt_transparent))
1847 check_our_parents ();
1848 break; 1836 break;
1849 } 1837 }
1850# endif 1838# endif
1851} 1839}
1852#endif 1840#endif
3432 break; 3420 break;
3433 case URxvt_Color_IT: 3421 case URxvt_Color_IT:
3434 process_color_seq (op, Color_IT, str, resp); 3422 process_color_seq (op, Color_IT, str, resp);
3435 break; 3423 break;
3436#endif 3424#endif
3437#if ENABLE_TRANSPARENCY && TINTING 3425#if ENABLE_TRANSPARENCY
3438 case URxvt_Color_tint: 3426 case URxvt_Color_tint:
3439 process_color_seq (op, Color_tint, str, resp); 3427 process_color_seq (op, Color_tint, str, resp);
3440 3428 {
3441 check_our_parents (); 3429 bool changed = false;
3442 3430 if (ISSET_PIXCOLOR (Color_tint))
3443 if (am_transparent) 3431 changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]);
3444 want_full_refresh = want_refresh = 1; 3432 else
3433 changed = bgPixmap.unset_tint ();
3434 if (changed)
3435 update_background ();
3436 }
3445 3437
3446 break; 3438 break;
3447#endif 3439#endif
3448 3440
3449#if XPM_BACKGROUND 3441#if XPM_BACKGROUND
3450 case Rxvt_Pixmap: 3442 case Rxvt_Pixmap:
3451 { 3443 if (!strcmp (str, "?"))
3452 if (*str != ';')
3453 { 3444 {
3454 bgPixmap.handle_geometry (""); /* reset to default scaling */ 3445 char str[256];
3455 set_bgPixmap (str); /* change pixmap */ 3446
3456 scr_touch (true); 3447 sprintf (str, "[%dx%d+%d+%d]", /* can't presume snprintf () ! */
3448 min (bgPixmap.h_scale, 32767), min (bgPixmap.v_scale, 32767),
3449 min (bgPixmap.h_align, 32767), min (bgPixmap.v_align, 32767));
3450 process_xterm_seq (XTerm_title, str, CHAR_ST);
3457 } 3451 }
3458 3452 else
3453 {
3459 int changed = 0; 3454 int changed = 0;
3460 3455
3461 while ((str = strchr (str, ';')) != NULL) 3456 if (*str != ';')
3462 { 3457 {
3458 /* reset to default scaling :*/
3459 bgPixmap.unset_geometry ();
3460 if (bgPixmap.set_file (str)) /* change pixmap */
3461 changed++;
3462 str = strchr (str, ';');
3463 if (str == NULL)
3464 bgPixmap.set_defaultGeometry ();
3465 }
3466 while (str)
3467 {
3463 str++; 3468 str++;
3464 changed += bgPixmap.handle_geometry (str); 3469 if (bgPixmap.set_geometry (str))
3470 changed++;
3471 str = strchr (str, ';');
3465 } 3472 }
3466
3467 if (changed) 3473 if (changed)
3468 { 3474 update_background ();
3469 resize_pixmap ();
3470 scr_touch (true);
3471 } 3475 }
3472#if ENABLE_TRANSPARENCY && defined(HAVE_AFTERIMAGE)
3473 if (option (Opt_transparent))
3474 check_our_parents ();
3475#endif
3476 }
3477 break; 3476 break;
3478#endif 3477#endif
3479 3478
3480 case Rxvt_restoreFG: 3479 case Rxvt_restoreFG:
3481 set_window_color (Color_fg, str); 3480 set_window_color (Color_fg, str);
3605{ 3604{
3606 unsigned int i, j; 3605 unsigned int i, j;
3607 int state; 3606 int state;
3608 3607
3609 static const struct 3608 static const struct
3610 { 3609 {
3611 const int argval; 3610 const int argval;
3612 const unsigned long bit; 3611 const unsigned long bit;
3613 }
3614
3615 argtopriv[] = { 3612 } argtopriv[] = {
3616 { 1, PrivMode_aplCUR }, 3613 { 1, PrivMode_aplCUR },
3617 { 2, PrivMode_vt52 }, 3614 { 2, PrivMode_vt52 },
3618 { 3, PrivMode_132 }, 3615 { 3, PrivMode_132 },
3619 { 4, PrivMode_smoothScroll }, 3616 { 4, PrivMode_smoothScroll },
3620 { 5, PrivMode_rVideo }, 3617 { 5, PrivMode_rVideo },

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines