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.120 by sf-exg, Thu Nov 18 17:29:25 2010 UTC vs.
Revision 1.121 by sf-exg, Fri Nov 19 23:29:30 2010 UTC

103#endif 103#endif
104 flags = 0; 104 flags = 0;
105 pixmap = None; 105 pixmap = None;
106 valid_since = invalid_since = 0; 106 valid_since = invalid_since = 0;
107 target = 0; 107 target = 0;
108 target_x = target_y = 0;
108} 109}
109 110
110void 111void
111bgPixmap_t::destroy () 112bgPixmap_t::destroy ()
112{ 113{
120 g_object_unref (pixbuf); 121 g_object_unref (pixbuf);
121#endif 122#endif
122 123
123 if (pixmap && target) 124 if (pixmap && target)
124 XFreePixmap (target->dpy, pixmap); 125 XFreePixmap (target->dpy, pixmap);
126}
127
128bool
129bgPixmap_t::set_position (int x, int y)
130{
131
132 if (target_x != x
133 || target_y != y)
134 {
135 target_x = x;
136 target_y = y;
137 return true;
138 }
139 return false;
125} 140}
126 141
127bool 142bool
128bgPixmap_t::window_size_sensitive () 143bgPixmap_t::window_size_sensitive ()
129{ 144{
383 if (!w) w = image_width; 398 if (!w) w = image_width;
384 if (!h) h = image_height; 399 if (!h) h = image_height;
385 400
386 if (flags & rootAlign) 401 if (flags & rootAlign)
387 { 402 {
388 target->get_window_origin (x, y);
389 x = -x; 403 x = -target_x;
390 y = -y; 404 y = -target_y;
391 } 405 }
392 else 406 else
393 { 407 {
394 x = make_align_position (h_align, target_width, w); 408 x = make_align_position (h_align, target_width, w);
395 y = make_align_position (v_align, target_height, h); 409 y = make_align_position (v_align, target_height, h);
1200 int window_height = target->szHint.height; 1214 int window_height = target->szHint.height;
1201 int sx, sy; 1215 int sx, sy;
1202 XGCValues gcv; 1216 XGCValues gcv;
1203 GC gc; 1217 GC gc;
1204 1218
1205 target->get_window_origin (sx, sy); 1219 sx = target_x;
1220 sy = target_y;
1206 1221
1207 /* check if we are outside of the visible part of the virtual screen : */ 1222 /* check if we are outside of the visible part of the virtual screen : */
1208 if (sx + window_width <= 0 || sy + window_height <= 0 1223 if (sx + window_width <= 0 || sy + window_height <= 0
1209 || sx >= root_width || sy >= root_height) 1224 || sx >= root_width || sy >= root_height)
1210 return 0; 1225 return 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines