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.12 by pcg, Sun Feb 1 01:34:41 2004 UTC vs.
Revision 1.13 by pcg, Mon Feb 9 07:11:49 2004 UTC

42 scrollBar.setIdle (); 42 scrollBar.setIdle ();
43 if (!scrollBar.win) 43 if (!scrollBar.win)
44 resize_scrollbar (); 44 resize_scrollbar ();
45 if (scrollBar.win) 45 if (scrollBar.win)
46 { 46 {
47 XMapWindow(Xdisplay, scrollBar.win); 47 XMapWindow(display->display, scrollBar.win);
48 change = 1; 48 change = 1;
49 } 49 }
50 } 50 }
51 else if (!map && scrollbar_visible()) 51 else if (!map && scrollbar_visible())
52 { 52 {
53 scrollBar.state = 0; 53 scrollBar.state = 0;
54 XUnmapWindow(Xdisplay, scrollBar.win); 54 XUnmapWindow(display->display, scrollBar.win);
55 change = 1; 55 change = 1;
56 } 56 }
57#endif 57#endif
58 return change; 58 return change;
59} 59}
107#endif 107#endif
108 108
109 if (!scrollBar.win) 109 if (!scrollBar.win)
110 { 110 {
111 /* create the scrollbar window */ 111 /* create the scrollbar window */
112 scrollBar.win = XCreateSimpleWindow(Xdisplay, 112 scrollBar.win = XCreateSimpleWindow(display->display,
113 TermWin.parent[0], 113 TermWin.parent[0],
114 window_sb_x, 0, 114 window_sb_x, 0,
115 scrollbar_TotalWidth(), 115 scrollbar_TotalWidth(),
116 szHint.height, 116 szHint.height,
117 0, 117 0,
118 PixColors[Color_fg], 118 PixColors[Color_fg],
119 PixColors[Color_bg]); 119 PixColors[Color_bg]);
120#ifdef DEBUG_X 120#ifdef DEBUG_X
121 XStoreName(Xdisplay, scrollBar.win, "scrollbar"); 121 XStoreName(display->display, scrollBar.win, "scrollbar");
122#endif 122#endif
123 XDefineCursor(Xdisplay, scrollBar.win, leftptr_cursor); 123 XDefineCursor(display->display, scrollBar.win, leftptr_cursor);
124
124 XSelectInput(Xdisplay, scrollBar.win, 125 XSelectInput(display->display, scrollBar.win,
125 (ExposureMask | ButtonPressMask | ButtonReleaseMask 126 ExposureMask | ButtonPressMask | ButtonReleaseMask
126 | Button1MotionMask | Button2MotionMask 127 | Button1MotionMask | Button2MotionMask
127 | Button3MotionMask)); 128 | Button3MotionMask);
129 scrollbar_ev.start (display, scrollBar.win);
130
128 delayed_init = 1; 131 delayed_init = 1;
129 } 132 }
133
130 scrollbar_show (1); 134 scrollbar_show (1);
135
131 if (delayed_init) 136 if (delayed_init)
132 XMapWindow (Xdisplay, scrollBar.win); 137 XMapWindow (display->display, scrollBar.win);
133#endif 138#endif
134} 139}
135 140
136/* 141/*
137 * Update current scrollbar view w.r.t. slider heights, etc. 142 * Update current scrollbar view w.r.t. slider heights, etc.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines