~ubuntu-branches/ubuntu/trusty/rxvt-unicode/trusty-proposed

« back to all changes in this revision

Viewing changes to src/scrollbar-plain.C

  • Committer: Bazaar Package Importer
  • Author(s): Decklin Foster
  • Date: 2008-06-16 21:15:27 UTC
  • mfrom: (1.1.13 upstream) (3.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20080616211527-f90zn8olh4d2486w
New Upstream Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#if defined(PLAIN_SCROLLBAR)
29
29
 
30
30
int
31
 
rxvt_term::scrollbar_show_plain (int update, int last_top, int last_bot, int scrollbar_len)
 
31
scrollBar_t::show_plain (int update)
32
32
{
33
33
  int xsb = 0;
34
 
  int sbwidth = scrollBar.width - 1;
 
34
  int sbwidth = width - 1;
35
35
 
36
 
  if ((scrollBar.init & R_SB_PLAIN) == 0)
 
36
  if ((init & R_SB_PLAIN) == 0)
37
37
    {
38
38
      XGCValues gcvalue;
39
39
 
40
 
      scrollBar.init |= R_SB_PLAIN;
41
 
      gcvalue.foreground = pix_colors_focused[Color_scroll];
 
40
      init |= R_SB_PLAIN;
 
41
      gcvalue.foreground = term->pix_colors_focused[Color_scroll];
42
42
 
43
 
      pscrollbarGC = XCreateGC (dpy, scrollBar.win, GCForeground, &gcvalue);
 
43
      pscrollbarGC = XCreateGC (term->dpy, win, GCForeground, &gcvalue);
44
44
    }
45
45
 
46
 
  xsb = option (Opt_scrollBar_right) ? 1 : 0;
 
46
  xsb = term->option (Opt_scrollBar_right) ? 1 : 0;
47
47
 
48
48
  if (update)
49
49
    {
50
 
      if (last_top < scrollBar.top)
51
 
        XClearArea (dpy, scrollBar.win,
52
 
                    scrollBar.shadow, last_top,
53
 
                    sbwidth + 1, scrollBar.top - last_top, False);
 
50
      if (last_top < top)
 
51
        XClearArea (term->dpy, win,
 
52
                    0, last_top,
 
53
                    sbwidth + 1, top - last_top, False);
54
54
 
55
 
      if (scrollBar.bot < last_bot)
56
 
        XClearArea (dpy, scrollBar.win,
57
 
                    scrollBar.shadow, scrollBar.bot,
58
 
                    sbwidth + 1, last_bot - scrollBar.bot, False);
 
55
      if (bot < last_bot)
 
56
        XClearArea (term->dpy, win,
 
57
                    0, bot,
 
58
                    sbwidth + 1, last_bot - bot, False);
59
59
    }
60
60
  else
61
 
    XClearWindow (dpy, scrollBar.win);
 
61
    XClearWindow (term->dpy, win);
62
62
 
63
63
  /* scrollbar slider */
64
 
  XFillRectangle (dpy, scrollBar.win, pscrollbarGC,
65
 
                  1 - xsb, scrollBar.top, sbwidth, scrollbar_len);
 
64
  XFillRectangle (term->dpy, win, pscrollbarGC,
 
65
                  1 - xsb, top, sbwidth, bot - top);
66
66
 
67
67
  return 1;
68
68
}