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

Comparing rxvt-unicode/src/scrollbar.C (file contents):
Revision 1.45 by ayin, Tue Jan 1 21:14:39 2008 UTC vs.
Revision 1.47 by ayin, Fri Jan 4 17:57:28 2008 UTC

118 scrollbar_TotalWidth (), 118 scrollbar_TotalWidth (),
119 szHint.height, 119 szHint.height,
120 0, 120 0,
121 pix_colors[Color_fg], 121 pix_colors[Color_fg],
122 pix_colors[Color_border]); 122 pix_colors[Color_border]);
123 XDefineCursor (dpy, scrollBar.win, leftptr_cursor); 123 XDefineCursor (dpy, scrollBar.win, scrollBar.leftptr_cursor);
124 124
125 XSelectInput (dpy, scrollBar.win, 125 XSelectInput (dpy, scrollBar.win,
126 ExposureMask | ButtonPressMask | ButtonReleaseMask 126 ExposureMask | ButtonPressMask | ButtonReleaseMask
127 | Button1MotionMask | Button2MotionMask 127 | Button1MotionMask | Button2MotionMask
128 | Button3MotionMask); 128 | Button3MotionMask);
159 adj = (((bot - top) * scrollbar_size ()) % len) > 0 ? 1 : 0; 159 adj = (((bot - top) * scrollbar_size ()) % len) > 0 ? 1 : 0;
160 160
161 scrollBar.top = (scrollBar.beg + (top * scrollbar_size ()) / len); 161 scrollBar.top = (scrollBar.beg + (top * scrollbar_size ()) / len);
162 scrollBar.len = ((bot - top) * scrollbar_size ()) / len + 162 scrollBar.len = ((bot - top) * scrollbar_size ()) / len +
163 scrollbar_minheight () + adj; 163 scrollbar_minheight () + adj;
164 scrollBar.bot = (scrollBar.top + ScrollBar.len); 164 scrollBar.bot = (scrollBar.top + scrollBar.len);
165 /* no change */ 165 /* no change */
166 if (scrollBar.top == scrollBar.last_top 166 if (scrollBar.top == scrollBar.last_top
167 && scrollBar.bot == scrollBar.last_bot 167 && scrollBar.bot == scrollBar.last_bot
168 && (scrollBar.state == scrollBar.last_state || !scrollbar_isUpDn ())) 168 && (scrollBar.state == scrollBar.last_state || !scrollbar_isUpDn ()))
169 return 0; 169 return 0;
244 scrollBar.align = R_SB_ALIGN_TOP; 244 scrollBar.align = R_SB_ALIGN_TOP;
245 else if (strncasecmp (scrollalign, "bottom", 6) == 0) 245 else if (strncasecmp (scrollalign, "bottom", 6) == 0)
246 scrollBar.align = R_SB_ALIGN_BOTTOM; 246 scrollBar.align = R_SB_ALIGN_BOTTOM;
247 } 247 }
248 scrollBar.last_bot = scrollBar.last_state = -1; 248 scrollBar.last_bot = scrollBar.last_state = -1;
249 /* cursor scrollBar: Black-on-White */
250 scrollBar.leftptr_cursor = XCreateFontCursor (dpy, XC_left_ptr);
249#endif 251#endif
250} 252}
251 253
252/*----------------------- end-of-file (C source) -----------------------*/ 254/*----------------------- end-of-file (C source) -----------------------*/
253 255

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines