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.338 by ayin, Tue Jul 31 17:39:39 2007 UTC vs.
Revision 1.345 by sasha, Mon Aug 13 22:41:34 2007 UTC

1485 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) 1485 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height)
1486 { 1486 {
1487 seen_resize = 1; 1487 seen_resize = 1;
1488 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); 1488 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1);
1489#ifdef XPM_BACKGROUND 1489#ifdef XPM_BACKGROUND
1490 /* TODO: replace with update_pixmap() that should unify transparency and bg image handling ! */
1490 if (!option (Opt_transparent) && bgPixmap.auto_resize) 1491 if (!option (Opt_transparent) && bgPixmap.window_size_sensitive ())
1491 { 1492 {
1492 resize_pixmap (); 1493 bgPixmap.render ();
1493 scr_touch (true); 1494 scr_touch (true);
1494 } 1495 }
1495#endif 1496#endif
1496 } 1497 }
1497 1498
1498 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); 1499 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END));
1499 1500
1500#ifdef ENABLE_TRANSPARENCY 1501#ifdef ENABLE_TRANSPARENCY
1501 if (option (Opt_transparent)) 1502 if (option (Opt_transparent))
1502 check_our_parents (); 1503 bgPixmap.render ();
1503#endif 1504#endif
1504 } 1505 }
1505 break; 1506 break;
1506 1507
1507 case PropertyNotify: 1508 case PropertyNotify:
1576 if (isScrollbarWindow (ev.xany.window)) 1577 if (isScrollbarWindow (ev.xany.window))
1577 { 1578 {
1578 scrollBar.setIdle (); 1579 scrollBar.setIdle ();
1579 scrollbar_show (0); 1580 scrollbar_show (0);
1580 } 1581 }
1581
1582#ifdef ENABLE_TRANSPARENCY
1583 if (am_transparent && ev.xany.window == parent[0])
1584 XClearWindow (dpy, ev.xany.window);
1585#endif
1586 } 1582 }
1587 break; 1583 break;
1588 1584
1589 case MotionNotify: 1585 case MotionNotify:
1590#ifdef POINTER_BLANK 1586#ifdef POINTER_BLANK
1834 case PropertyNotify: 1830 case PropertyNotify:
1835 /* 1831 /*
1836 * 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,
1837 * 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.
1838 */ 1834 */
1839 if (ev.xproperty.atom != xa[XA_XROOTPMAP_ID] 1835 if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID]
1840 && ev.xproperty.atom != xa[XA_ESETROOT_PMAP_ID]) 1836 || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID])
1841 return; 1837 {
1842 1838 bgPixmap.set_root_pixmap ();
1843 /* FALLTHROUGH */ 1839 bgPixmap.render ();
1844 case ReparentNotify: 1840 }
1845 if (option (Opt_transparent))
1846 check_our_parents ();
1847 break; 1841 break;
1848 } 1842 }
1849# endif 1843# endif
1850} 1844}
1851#endif 1845#endif
3431 break; 3425 break;
3432 case URxvt_Color_IT: 3426 case URxvt_Color_IT:
3433 process_color_seq (op, Color_IT, str, resp); 3427 process_color_seq (op, Color_IT, str, resp);
3434 break; 3428 break;
3435#endif 3429#endif
3436#if ENABLE_TRANSPARENCY && TINTING 3430#if ENABLE_TRANSPARENCY
3437 case URxvt_Color_tint: 3431 case URxvt_Color_tint:
3438 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 }
3439 3442
3440 check_our_parents ();
3441
3442 if (am_transparent)
3443 want_full_refresh = want_refresh = 1;
3444
3445 break; 3443 break;
3446#endif 3444#endif
3447 3445
3446#if XPM_BACKGROUND
3448 case Rxvt_Pixmap: 3447 case Rxvt_Pixmap:
3448 if (!strcmp (str, "?"))
3449 { 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
3450 if (*str != ';') 3461 if (*str != ';')
3451 { 3462 {
3452#if XPM_BACKGROUND
3453 scale_pixmap (""); /* reset to default scaling */ 3463 /* reset to default scaling :*/
3464 bgPixmap.unset_geometry ();
3454 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 ();
3455 scr_touch (true); 3481 scr_touch (true);
3456#endif
3457 } 3482 }
3458
3459 int changed = 0;
3460
3461 while ((str = strchr (str, ';')) != NULL)
3462 {
3463 str++;
3464#if XPM_BACKGROUND
3465 changed += scale_pixmap (str);
3466#endif
3467 } 3483 }
3468
3469 if (changed)
3470 {
3471#ifdef XPM_BACKGROUND
3472 resize_pixmap ();
3473 scr_touch (true);
3474#endif
3475 }
3476#if ENABLE_TRANSPARENCY && defined(HAVE_AFTERIMAGE)
3477 if (option (Opt_transparent))
3478 check_our_parents ();
3479#endif
3480 }
3481 break; 3484 break;
3485#endif
3482 3486
3483 case Rxvt_restoreFG: 3487 case Rxvt_restoreFG:
3484 set_window_color (Color_fg, str); 3488 set_window_color (Color_fg, str);
3485 break; 3489 break;
3486 case Rxvt_restoreBG: 3490 case Rxvt_restoreBG:
3608{ 3612{
3609 unsigned int i, j; 3613 unsigned int i, j;
3610 int state; 3614 int state;
3611 3615
3612 static const struct 3616 static const struct
3613 { 3617 {
3614 const int argval; 3618 const int argval;
3615 const unsigned long bit; 3619 const unsigned long bit;
3616 }
3617
3618 argtopriv[] = { 3620 } argtopriv[] = {
3619 { 1, PrivMode_aplCUR }, 3621 { 1, PrivMode_aplCUR },
3620 { 2, PrivMode_vt52 }, 3622 { 2, PrivMode_vt52 },
3621 { 3, PrivMode_132 }, 3623 { 3, PrivMode_132 },
3622 { 4, PrivMode_smoothScroll }, 3624 { 4, PrivMode_smoothScroll },
3623 { 5, PrivMode_rVideo }, 3625 { 5, PrivMode_rVideo },

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines