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.28 by ayin, Tue Jan 29 13:57:23 2008 UTC vs.
Revision 1.29 by root, Tue Jan 29 17:52:52 2008 UTC

1282bgPixmap_t::apply () 1282bgPixmap_t::apply ()
1283{ 1283{
1284 if (target) 1284 if (target)
1285 { 1285 {
1286 flags &= ~isVtOrigin; 1286 flags &= ~isVtOrigin;
1287
1287 if (pixmap != None) 1288 if (pixmap != None)
1288 { 1289 {
1289 /* set target's background to pixmap */ 1290 /* set target's background to pixmap */
1290# ifdef ENABLE_TRANSPARENCY 1291# ifdef ENABLE_TRANSPARENCY
1291 if (flags & isTransparent) 1292 if (flags & isTransparent)
1292 { 1293 {
1293 XSetWindowBackgroundPixmap (target->dpy, target->parent[0], pixmap); 1294 XSetWindowBackgroundPixmap (target->dpy, target->parent[0], pixmap);
1294 XSetWindowBackgroundPixmap (target->dpy, target->vt, ParentRelative); 1295 XSetWindowBackgroundPixmap (target->dpy, target->vt, ParentRelative);
1296
1295 if (target->scrollBar.win) 1297 if (target->scrollBar.win)
1296 XSetWindowBackgroundPixmap (target->dpy, target->scrollBar.win, ParentRelative); 1298 XSetWindowBackgroundPixmap (target->dpy, target->scrollBar.win, ParentRelative);
1297 } 1299 }
1298 else 1300 else
1299# endif 1301# endif
1301 flags |= isVtOrigin; 1303 flags |= isVtOrigin;
1302 /* force old pixmap dereference in case it was transparent before :*/ 1304 /* force old pixmap dereference in case it was transparent before :*/
1303 XSetWindowBackground (target->dpy, target->parent[0], target->pix_colors[Color_border]); 1305 XSetWindowBackground (target->dpy, target->parent[0], target->pix_colors[Color_border]);
1304 XSetWindowBackgroundPixmap (target->dpy, target->vt, pixmap); 1306 XSetWindowBackgroundPixmap (target->dpy, target->vt, pixmap);
1305 /* do we also need to set scrollbar's background here ? */ 1307 /* do we also need to set scrollbar's background here ? */
1308
1306 if (target->scrollBar.win) 1309 if (target->scrollBar.win)
1307 XSetWindowBackground (target->dpy, target->scrollBar.win, target->pix_colors[Color_border]); 1310 XSetWindowBackground (target->dpy, target->scrollBar.win, target->pix_colors[Color_border]);
1308 } 1311 }
1309 } 1312 }
1310 else 1313 else
1311 { 1314 {
1312 /* set target background to a pixel */ 1315 /* set target background to a pixel */
1313 XSetWindowBackground (target->dpy, target->parent[0], target->pix_colors[Color_border]); 1316 XSetWindowBackground (target->dpy, target->parent[0], target->pix_colors[Color_border]);
1314 XSetWindowBackground (target->dpy, target->vt, target->pix_colors[Color_bg]); 1317 XSetWindowBackground (target->dpy, target->vt, target->pix_colors[Color_bg]);
1315 /* do we also need to set scrollbar's background here ? */ 1318 /* do we also need to set scrollbar's background here ? */
1316 if (target->scrollBar.win) 1319 if (target->scrollBar.win)
1317 XSetWindowBackground (target->dpy, target->scrollBar.win, target->pix_colors[Color_border]); 1320 XSetWindowBackground (target->dpy, target->scrollBar.win, target->pix_colors[Color_border]);
1318 } 1321 }
1322
1319 /* don't want Expose on the parent or vt. It is better to use 1323 /* don't want Expose on the parent or vt. It is better to use
1320 scr_touch or we get a great deal of flicker otherwise: */ 1324 scr_touch or we get a great deal of flicker otherwise: */
1321 XClearWindow (target->dpy, target->parent[0]); 1325 XClearWindow (target->dpy, target->parent[0]);
1322 1326
1323 if (target->scrollBar.win) 1327 if (target->scrollBar.win)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines