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.26 by root, Wed Jan 23 11:10:27 2008 UTC vs.
Revision 1.30 by ayin, Tue Feb 19 10:47:03 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);
1295# if HAVE_SCROLLBARS 1296
1296 if (target->scrollBar.win) 1297 if (target->scrollBar.win)
1297 XSetWindowBackgroundPixmap (target->dpy, target->scrollBar.win, ParentRelative); 1298 XSetWindowBackgroundPixmap (target->dpy, target->scrollBar.win, ParentRelative);
1298# endif
1299 } 1299 }
1300 else 1300 else
1301# endif 1301# endif
1302 { 1302 {
1303 flags |= isVtOrigin; 1303 flags |= isVtOrigin;
1304 /* force old pixmap dereference in case it was transparent before :*/ 1304 /* force old pixmap dereference in case it was transparent before :*/
1305 XSetWindowBackground (target->dpy, target->parent[0], target->pix_colors[Color_border]); 1305 XSetWindowBackground (target->dpy, target->parent[0], target->pix_colors[Color_border]);
1306 XSetWindowBackgroundPixmap (target->dpy, target->vt, pixmap); 1306 XSetWindowBackgroundPixmap (target->dpy, target->vt, pixmap);
1307 /* do we also need to set scrollbar's background here ? */ 1307 /* do we also need to set scrollbar's background here ? */
1308# if HAVE_SCROLLBARS 1308
1309 if (target->scrollBar.win) 1309 if (target->scrollBar.win)
1310 XSetWindowBackground (target->dpy, target->scrollBar.win, target->pix_colors[Color_border]); 1310 XSetWindowBackground (target->dpy, target->scrollBar.win, target->pix_colors[Color_border]);
1311# endif
1312 } 1311 }
1313 } 1312 }
1314 else 1313 else
1315 { 1314 {
1316 /* set target background to a pixel */ 1315 /* set target background to a pixel */
1317 XSetWindowBackground (target->dpy, target->parent[0], target->pix_colors[Color_border]); 1316 XSetWindowBackground (target->dpy, target->parent[0], target->pix_colors[Color_border]);
1318 XSetWindowBackground (target->dpy, target->vt, target->pix_colors[Color_bg]); 1317 XSetWindowBackground (target->dpy, target->vt, target->pix_colors[Color_bg]);
1319 /* do we also need to set scrollbar's background here ? */ 1318 /* do we also need to set scrollbar's background here ? */
1320# if HAVE_SCROLLBARS
1321 if (target->scrollBar.win) 1319 if (target->scrollBar.win)
1322 XSetWindowBackground (target->dpy, target->scrollBar.win, target->pix_colors[Color_border]); 1320 XSetWindowBackground (target->dpy, target->scrollBar.win, target->pix_colors[Color_border]);
1323# endif
1324 } 1321 }
1322
1325 /* 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
1326 scr_touch or we get a great deal of flicker otherwise: */ 1324 scr_touch or we get a great deal of flicker otherwise: */
1327 XClearWindow (target->dpy, target->parent[0]); 1325 XClearWindow (target->dpy, target->parent[0]);
1328 1326
1329# if HAVE_SCROLLBARS
1330 if (target->scrollBar.win) 1327 if (target->scrollBar.win)
1331 { 1328 {
1332 target->scrollBar.setIdle (); 1329 target->scrollBar.state = STATE_IDLE;
1333 target->scrollbar_show (0); 1330 target->scrollBar.show (0);
1334 } 1331 }
1335# endif
1336 1332
1337 target->want_refresh = 1; 1333 target->want_refresh = 1;
1338 flags |= hasChanged; 1334 flags |= hasChanged;
1339 } 1335 }
1340} 1336}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines