ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/background.C
(Generate patch)

Comparing rxvt-unicode/src/background.C (file contents):
Revision 1.137 by sf-exg, Sat Jan 15 17:41:43 2011 UTC vs.
Revision 1.138 by sf-exg, Thu Jan 20 17:39:29 2011 UTC

1443 XFreePixmap (target->dpy, pixmap); 1443 XFreePixmap (target->dpy, pixmap);
1444 pixmap = None; 1444 pixmap = None;
1445 } 1445 }
1446 } 1446 }
1447 1447
1448 apply (); 1448 target->scr_recolour (false);
1449 flags |= hasChanged;
1449 1450
1450 valid_since = ev::now (); 1451 valid_since = ev::now ();
1451 1452
1452 return true; 1453 return true;
1453} 1454}
1470 flags |= HAS_RENDER_CONV; 1471 flags |= HAS_RENDER_CONV;
1471 1472
1472 XFree (filters); 1473 XFree (filters);
1473 } 1474 }
1474#endif 1475#endif
1475}
1476
1477void
1478bgPixmap_t::apply ()
1479{
1480 if (target == NULL)
1481 return;
1482
1483 if (pixmap != None)
1484 {
1485 /* set target's background to pixmap */
1486# ifdef ENABLE_TRANSPARENCY
1487 if (flags & isTransparent)
1488 {
1489 XSetWindowBackgroundPixmap (target->dpy, target->parent[0], pixmap);
1490 XSetWindowBackgroundPixmap (target->dpy, target->vt, ParentRelative);
1491
1492 if (target->scrollBar.win)
1493 XSetWindowBackgroundPixmap (target->dpy, target->scrollBar.win, ParentRelative);
1494 }
1495 else
1496# endif
1497 {
1498 /* force old pixmap dereference in case it was transparent before :*/
1499 XSetWindowBackground (target->dpy, target->parent[0], target->pix_colors[Color_border]);
1500 XSetWindowBackgroundPixmap (target->dpy, target->vt, pixmap);
1501 /* do we also need to set scrollbar's background here ? */
1502
1503 if (target->scrollBar.win)
1504 XSetWindowBackground (target->dpy, target->scrollBar.win, target->pix_colors[Color_border]);
1505 }
1506 }
1507 else
1508 {
1509 /* set target background to a pixel */
1510 XSetWindowBackground (target->dpy, target->parent[0], target->pix_colors[Color_border]);
1511 XSetWindowBackground (target->dpy, target->vt, target->pix_colors[Color_bg]);
1512 /* do we also need to set scrollbar's background here ? */
1513 if (target->scrollBar.win)
1514 XSetWindowBackground (target->dpy, target->scrollBar.win, target->pix_colors[Color_border]);
1515 }
1516
1517 /* don't want Expose on the parent or vt. It is better to use
1518 scr_touch or we get a great deal of flicker otherwise: */
1519 XClearWindow (target->dpy, target->parent[0]);
1520
1521 if (target->scrollBar.state && target->scrollBar.win)
1522 {
1523 target->scrollBar.state = STATE_IDLE;
1524 target->scrollBar.show (0);
1525 }
1526
1527 target->want_refresh = 1;
1528 flags |= hasChanged;
1529} 1476}
1530 1477
1531#endif /* HAVE_BG_PIXMAP */ 1478#endif /* HAVE_BG_PIXMAP */
1532 1479
1533#if defined(ENABLE_TRANSPARENCY) && !defined(HAVE_AFTERIMAGE) 1480#if defined(ENABLE_TRANSPARENCY) && !defined(HAVE_AFTERIMAGE)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines