-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 2a3e525d7de519e345d4858e83bad1d3b2efb37a: path_to: revision_to:
commit 2a3e525d7de519e345d4858e83bad1d3b2efb37a Author: Marc Lehmann <schmorp@schmorp.de> Date: Wed Jan 25 21:09:22 2006 +0000 *** empty log message *** diff --git a/src/command.C b/src/command.C
--- a/src/command.C +++ b/src/command.C @@ -1166,7 +1166,7 @@ rxvt_term::pty_cb (io_watcher &w, short revents) void rxvt_term::pointer_unblank () { - XDefineCursor (display->display, vt, TermWin_cursor); + XDefineCursor (xdisp, vt, TermWin_cursor); recolour_cursor (); #ifdef POINTER_BLANK @@ -1184,8 +1184,8 @@ rxvt_term::pointer_blank () if (!OPTION (Opt_pointerBlank)) return; - XDefineCursor (display->display, vt, display->blank_cursor); - XFlush (display->display); + XDefineCursor (xdisp, vt, display->blank_cursor); + XFlush (xdisp); hidden_pointer = 1; } diff --git a/src/init.C b/src/init.C
--- a/src/init.C +++ b/src/init.C @@ -299,6 +299,15 @@ rxvt_term::init_resources (int argc, const char *const *argv) if (!(display = displays.get (rs[Rs_display_name]))) rxvt_fatal ("can't open display %s, aborting.\n", rs[Rs_display_name]); + xa = display->xa; + +#if ENABLE_FRILLS + if (rs[Rs_depth]) + set (display, strtol (rs[Rs_depth], 0, 0)); + else +#endif + set (display); + extract_resources (); free (r_argv); @@ -316,15 +325,6 @@ rxvt_term::init_resources (int argc, const char *const *argv) } #endif - xa = display->xa; - -#if ENABLE_FRILLS - if (rs[Rs_depth]) - set (display, strtol (rs[Rs_depth], 0, 0)); - else -#endif - set (display); - /* * set any defaults not already set */ @@ -484,7 +484,7 @@ rxvt_term::init_env () if (val == NULL) #endif /* DISPLAY_IS_IP */ - val = XDisplayString (display->display); + val = XDisplayString (xdisp); if (rs[Rs_display_name] == NULL) rs[Rs_display_name] = val; /* use broken `:0' value */ @@ -806,7 +806,7 @@ rxvt_term::get_ourmods () && strcasecmp (rsmod, "mod1") >= 0 && strcasecmp (rsmod, "mod5") <= 0) requestedmeta = rsmod[3] - '0'; - map = XGetModifierMapping (display->display); + map = XGetModifierMapping (xdisp); kc = map->modifiermap; for (i = 1; i < 6; i++) @@ -818,7 +818,7 @@ rxvt_term::get_ourmods () if (kc[k] == 0) break; - switch (XKeycodeToKeysym (display->display, kc[k], 0)) + switch (XKeycodeToKeysym (xdisp, kc[k], 0)) { case XK_Num_Lock: ModNumLockMask = modmasks[i - 1]; diff --git a/src/main.C b/src/main.C
--- a/src/main.C +++ b/src/main.C @@ -516,7 +516,7 @@ rxvt_term::init (int argc, const char *const *argv, stringvec *envv) { long info[2] = { 0, XEMBED_MAPPED }; - XChangeProperty (display->display, parent[0], xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO], + XChangeProperty (xdisp, parent[0], xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO], 32, PropModeReplace, (unsigned char *)&info, 2); } #endif @@ -844,7 +844,7 @@ rxvt_term::set_fonts () void rxvt_term::set_string_property (Atom prop, const char *str, int len) { - XChangeProperty (display->display, parent[0], + XChangeProperty (xdisp, parent[0], prop, XA_STRING, 8, PropModeReplace, (const unsigned char *)str, len >= 0 ? len : strlen (str)); } @@ -854,7 +854,7 @@ void rxvt_term::set_utf8_property (Atom prop, const char *str, int len) wchar_t *ws = rxvt_mbstowcs (str, len); char *s = rxvt_wcstoutf8 (ws); - XChangeProperty (display->display, parent[0], + XChangeProperty (xdisp, parent[0], prop, xa[XA_UTF8_STRING], 8, PropModeReplace, (const unsigned char *)s, strlen (s)); @@ -917,7 +917,7 @@ rxvt_term::set_window_color (int idx, const char *color) if (!rXParseAllocColor (&xcol, color)) return; - /* XStoreColor (display->display, display->cmap, XColor*); */ + /* XStoreColor (xdisp, display->cmap, XColor*); */ /* * FIXME: should free colors here, but no idea how to do it so instead, @@ -930,8 +930,8 @@ rxvt_term::set_window_color (int idx, const char *color) if (i > Color_White) { /* fprintf (stderr, "XFreeColors: pix_colors [%d] = %lu\n", idx, pix_colors [idx]); */ - XFreeColors (display->display, display->cmap, (pix_colors + idx), 1, - DisplayPlanes (display->display, display->screen)); + XFreeColors (xdisp, display->cmap, (pix_colors + idx), 1, + DisplayPlanes (xdisp, display->screen)); } # endif @@ -969,8 +969,8 @@ rxvt_term::recolour_cursor () ? pix_colors_focused[Color_pointer_bg] : pix_colors_focused[Color_bg]; - XQueryColors (display->display, cmap, xcol, 2); - XRecolorCursor (display->display, TermWin_cursor, xcol + 0, xcol + 1); + XQueryColors (xdisp, cmap, xcol, 2); + XRecolorCursor (xdisp, TermWin_cursor, xcol + 0, xcol + 1); } /*----------------------------------------------------------------------*/ @@ -1127,7 +1127,7 @@ rxvt_term::set_widthheight (unsigned int newwidth, unsigned int newheight) if (newwidth == 0 || newheight == 0) { - XGetWindowAttributes (display->display, display->root, &wattr); + XGetWindowAttributes (xdisp, display->root, &wattr); if (newwidth == 0) newwidth = wattr.width - szHint.base_width; @@ -1199,8 +1199,8 @@ rxvt_term::IMisRunning () if ((p = strchr (server + 1, '@')) != NULL) /* first one only */ *p = '\0'; - atom = XInternAtom (display->display, server, False); - win = XGetSelectionOwner (display->display, atom); + atom = XInternAtom (xdisp, server, False); + win = XGetSelectionOwner (xdisp, atom); if (win != None) return True; @@ -1434,7 +1434,7 @@ foundpet: fheight + 1, fheight - 1, fheight - 2, fheight + 2); - fs = XCreateFontSet (display->display, rs[Rs_imFont] ? rs[Rs_imFont] : pat, + fs = XCreateFontSet (xdisp, rs[Rs_imFont] ? rs[Rs_imFont] : pat, &missing_charset_list, &missing_charset_count, &def_string); if (missing_charset_list) @@ -1520,7 +1520,7 @@ foundpet: if (preedit_attr) XFree (preedit_attr); if (status_attr) XFree (status_attr); - if (fs) XFreeFontSet (display->display, fs); + if (fs) XFreeFontSet (xdisp, fs); if (Input_Context == NULL) { diff --git a/src/rxvtfont.C b/src/rxvtfont.C
--- a/src/rxvtfont.C +++ b/src/rxvtfont.C @@ -159,7 +159,7 @@ static uint16_t extent_test_chars[] = { #define NUM_EXTENT_TEST_CHARS (sizeof (extent_test_chars) / sizeof (extent_test_chars[0])) -#define dTermDisplay Display *disp = term->display->display +#define dTermDisplay Display *disp = term->xdisp #define dTermGC GC gc = term->gc ///////////////////////////////////////////////////////////////////////////// @@ -506,8 +506,8 @@ rxvt_font_x11::get_property (XFontStruct *f, const char *property, const char *r { unsigned long value; - if (XGetFontProperty (f, XInternAtom (term->display->display, property, 0), &value)) - return XGetAtomName (term->display->display, value); + if (XGetFontProperty (f, XInternAtom (term->xdisp, property, 0), &value)) + return XGetAtomName (term->xdisp, value); else return rxvt_strdup (repl); } @@ -538,14 +538,14 @@ rxvt_font_x11::set_properties (rxvt_fontprop &p, XFontStruct *f) unsigned long height; #if 0 - if (!XGetFontProperty (f, XInternAtom (term->display->display, "PIXEL_SIZE", 0), &height)) + if (!XGetFontProperty (f, XInternAtom (term->xdisp, "PIXEL_SIZE", 0), &height)) return false; #else height = f->ascent + f->descent; #endif unsigned long avgwidth; - if (!XGetFontProperty (f, XInternAtom (term->display->display, "AVERAGE_WIDTH", 0), &avgwidth)) + if (!XGetFontProperty (f, XInternAtom (term->xdisp, "AVERAGE_WIDTH", 0), &avgwidth)) avgwidth = 0; char *weight = get_property (f, "WEIGHT_NAME", "medium"); @@ -886,7 +886,7 @@ rxvt_font_x11::clear () { if (f) { - XFreeFont (term->display->display, f); + XFreeFont (term->xdisp, f); f = 0; } } @@ -1068,7 +1068,7 @@ rxvt_font_xft::clear () { if (f) { - XftFontClose (term->display->display, f); + XftFontClose (term->xdisp, f); f = 0; } } @@ -1245,7 +1245,7 @@ rxvt_font_xft::has_char (unicode_t unicode, const rxvt_fontprop *prop, bool &car { careful = false; - if (!XftCharExists (term->display->display, f, unicode)) + if (!XftCharExists (term->xdisp, f, unicode)) return false; if (!prop || prop->width == rxvt_fontprop::unset) @@ -1254,7 +1254,7 @@ rxvt_font_xft::has_char (unicode_t unicode, const rxvt_fontprop *prop, bool &car // check character against base font bounding box FcChar32 ch = unicode; XGlyphInfo g; - XftTextExtents32 (term->display->display, f, &ch, 1, &g); + XftTextExtents32 (term->xdisp, f, &ch, 1, &g); int w = g.width - g.x; int wcw = WCWIDTH (unicode); @@ -1562,7 +1562,7 @@ rxvt_fontset::find_font (unicode_t unicode) //FcPatternAddBool (p, FC_ANTIALIAS, 1); XftResult result; - FcPattern *match = XftFontMatch (term->display->display, term->display->screen, p, &result); + FcPattern *match = XftFontMatch (term->xdisp, term->display->screen, p, &result); FcPatternDestroy (p); diff --git a/src/rxvttoolkit.C b/src/rxvttoolkit.C
--- a/src/rxvttoolkit.C +++ b/src/rxvttoolkit.C @@ -183,14 +183,13 @@ void rxvt_screen::set (rxvt_display *disp) { display = disp; - - xdisp = disp->display; + xdisp = disp->display; Screen *screen = ScreenOfDisplay (xdisp, disp->screen); - depth = DefaultDepthOfScreen (screen); - visual = DefaultVisualOfScreen (screen); - cmap = DefaultColormapOfScreen (screen); + depth = DefaultDepthOfScreen (screen); + visual = DefaultVisualOfScreen (screen); + cmap = DefaultColormapOfScreen (screen); } void diff --git a/src/screen.C b/src/screen.C
--- a/src/screen.C +++ b/src/screen.C @@ -95,18 +95,18 @@ inline void fill_text (text_t *start, text_t value, int len) #define CLEAR_ROWS(row, num) \ if (mapped) \ - XClearArea (display->display, drawBuffer, 0, \ + XClearArea (xdisp, drawBuffer, 0, \ Row2Pixel (row), (unsigned int)width, \ (unsigned int)Height2Pixel (num), False) #define CLEAR_CHARS(x, y, num) \ if (mapped) \ - XClearArea (display->display, drawBuffer, x, y, \ + XClearArea (xdisp, drawBuffer, x, y, \ (unsigned int)Width2Pixel (num), \ (unsigned int)Height2Pixel (1), False) #define ERASE_ROWS(row, num) \ - XFillRectangle (display->display, drawBuffer, gc, \ + XFillRectangle (xdisp, drawBuffer, gc, \ 0, Row2Pixel (row), \ (unsigned int)width, \ (unsigned int)Height2Pixel (num)) @@ -1340,10 +1340,10 @@ rxvt_term::scr_erase_screen (int mode) NOTHROW { ren = rstyle & (RS_fgMask | RS_bgMask); gcvalue.foreground = pix_colors[bgcolor_of (rstyle)]; - XChangeGC (display->display, gc, GCForeground, &gcvalue); + XChangeGC (xdisp, gc, GCForeground, &gcvalue); ERASE_ROWS (row, num); gcvalue.foreground = pix_colors[Color_fg]; - XChangeGC (display->display, gc, GCForeground, &gcvalue); + XChangeGC (xdisp, gc, GCForeground, &gcvalue); } for (; num--; row++) @@ -1652,12 +1652,12 @@ rxvt_term::scr_rvideo_mode (bool on) NOTHROW #if TRANSPARENT if (!OPTION (Opt_transparent) || am_transparent == 0) #endif - XSetWindowBackground (display->display, vt, pix_colors[Color_bg]); + XSetWindowBackground (xdisp, vt, pix_colors[Color_bg]); XGCValues gcvalue; gcvalue.foreground = pix_colors[Color_fg]; gcvalue.background = pix_colors[Color_bg]; - XChangeGC (display->display, gc, GCBackground | GCForeground, &gcvalue); + XChangeGC (xdisp, gc, GCBackground | GCForeground, &gcvalue); scr_clear (); scr_touch (true); @@ -1887,7 +1887,7 @@ rxvt_term::scr_bell () NOTHROW # ifdef MAPALERT_OPTION if (OPTION (Opt_mapAlert)) # endif - XMapWindow (display->display, parent[0]); + XMapWindow (xdisp, parent[0]); # endif if (OPTION (Opt_visualBell)) @@ -1899,7 +1899,7 @@ rxvt_term::scr_bell () NOTHROW bell_ev.start (NOW + VISUAL_BELL_DURATION); } else - XBell (display->display, 0); + XBell (xdisp, 0); #endif } @@ -2148,7 +2148,7 @@ rxvt_term::scr_refresh () NOTHROW if (wlen < len) ::swap (wlen, len); - XCopyArea (display->display, vt, vt, + XCopyArea (xdisp, vt, vt, gc, 0, Row2Pixel (len + i), (unsigned int)this->width, (unsigned int)Height2Pixel (wlen - len + 1), @@ -2354,12 +2354,12 @@ rxvt_term::scr_refresh () NOTHROW { #if ENABLE_FRILLS if (ISSET_PIXCOLOR (Color_underline)) - XSetForeground (display->display, gc, pix_colors[Color_underline]); + XSetForeground (xdisp, gc, pix_colors[Color_underline]); else #endif - XSetForeground (display->display, gc, pix_colors[fore]); + XSetForeground (xdisp, gc, pix_colors[fore]); - XDrawLine (display->display, drawBuffer, gc, + XDrawLine (xdisp, drawBuffer, gc, xpixel, ypixel + font->ascent + 1, xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1); } @@ -2402,10 +2402,10 @@ rxvt_term::scr_refresh () NOTHROW #ifndef NO_CURSORCOLOR if (ISSET_PIXCOLOR (Color_cursor)) - XSetForeground (display->display, gc, pix_colors[Color_cursor]); + XSetForeground (xdisp, gc, pix_colors[Color_cursor]); #endif - XDrawRectangle (display->display, drawBuffer, gc, + XDrawRectangle (xdisp, drawBuffer, gc, Col2Pixel (col), Row2Pixel (oldcursor.row), (unsigned int) (Width2Pixel (cursorwidth) - 1), @@ -2459,13 +2459,13 @@ rxvt_term::scr_recolour () NOTHROW #endif ) { - XSetWindowBackground (display->display, parent[0], pix_colors[Color_border]); - XClearWindow (display->display, parent[0]); - XSetWindowBackground (display->display, vt, pix_colors[Color_bg]); + XSetWindowBackground (xdisp, parent[0], pix_colors[Color_border]); + XClearWindow (xdisp, parent[0]); + XSetWindowBackground (xdisp, vt, pix_colors[Color_bg]); #if HAVE_SCROLLBARS if (scrollBar.win) { - XSetWindowBackground (display->display, scrollBar.win, pix_colors[Color_border]); + XSetWindowBackground (xdisp, scrollBar.win, pix_colors[Color_border]); scrollBar.setIdle (); scrollbar_show (0); } @@ -2488,7 +2488,7 @@ rxvt_term::scr_clear (bool really) NOTHROW want_refresh = 1; if (really) - XClearWindow (display->display, vt); + XClearWindow (xdisp, vt); } void @@ -2673,7 +2673,7 @@ rxvt_term::selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW unsigned long bytes_after; XTextProperty ct; - if (XGetWindowProperty (display->display, win, prop, + if (XGetWindowProperty (xdisp, win, prop, 0, PROP_SIZE / 4, delete_prop, AnyPropertyType, &ct.encoding, &ct.format, @@ -2692,7 +2692,7 @@ rxvt_term::selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW // fetch and append remaining data XTextProperty ct2; - if (XGetWindowProperty (display->display, win, prop, + if (XGetWindowProperty (xdisp, win, prop, ct.nitems / 4, (bytes_after + 3) / 4, delete_prop, AnyPropertyType, &ct2.encoding, &ct2.format, @@ -2715,7 +2715,7 @@ rxvt_term::selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW { // INCR selection, start handshake if (!delete_prop) - XDeleteProperty (display->display, win, prop); + XDeleteProperty (xdisp, win, prop); selection_wait = Sel_incr; incr_buf_fill = 0; @@ -2786,7 +2786,7 @@ rxvt_term::selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW } else #endif - if (XmbTextPropertyToTextList (display->display, &ct, &cl, &cr) >= 0 + if (XmbTextPropertyToTextList (xdisp, &ct, &cl, &cr) >= 0 && cl) { for (int i = 0; i < cr; i++) @@ -2878,9 +2878,9 @@ rxvt_term::selection_request_other (Atom target, int selnum) NOTHROW else sel = xa[XA_CLIPBOARD]; - if (XGetSelectionOwner (display->display, sel) != None) + if (XGetSelectionOwner (xdisp, sel) != None) { - XConvertSelection (display->display, sel, target, xa[XA_VT_SELECTION], + XConvertSelection (xdisp, sel, target, xa[XA_VT_SELECTION], vt, selection_request_time); return 1; } @@ -3043,8 +3043,8 @@ rxvt_term::selection_grab (Time tm) NOTHROW { selection_time = tm; - XSetSelectionOwner (display->display, XA_PRIMARY, vt, tm); - if (XGetSelectionOwner (display->display, XA_PRIMARY) == vt) + XSetSelectionOwner (xdisp, XA_PRIMARY, vt, tm); + if (XGetSelectionOwner (xdisp, XA_PRIMARY) == vt) { display->set_selection_owner (this); return true; @@ -3058,7 +3058,7 @@ rxvt_term::selection_grab (Time tm) NOTHROW #if 0 XTextProperty ct; - if (XwcTextListToTextProperty (display->display, &selection.text, 1, XStringStyle, &ct) >= 0) + if (XwcTextListToTextProperty (xdisp, &selection.text, 1, XStringStyle, &ct) >= 0) { set_string_property (XA_CUT_BUFFER0, ct.value, ct.nitems); XFree (ct.value); @@ -3665,7 +3665,7 @@ rxvt_term::im_set_position (XPoint &pos) NOTHROW { XWindowAttributes xwa; - XGetWindowAttributes (display->display, vt, &xwa); + XGetWindowAttributes (xdisp, vt, &xwa); pos.x = xwa.x + Col2Pixel (screen.cur.col); pos.y = xwa.y + Height2Pixel (screen.cur.row) + fbase; diff --git a/src/scrollbar-next.C b/src/scrollbar-next.C
--- a/src/scrollbar-next.C +++ b/src/scrollbar-next.C @@ -123,7 +123,7 @@ rxvt_term::renderPixmap (const char *const *data, int width, int height) Pixmap d; GC pointcolour; - d = XCreatePixmap (display->display, scrollBar.win, width, height, depth); + d = XCreatePixmap (xdisp, scrollBar.win, width, height, depth); for (y = 0; y < height; y++) { @@ -138,7 +138,7 @@ rxvt_term::renderPixmap (const char *const *data, int width, int height) else /* if (a == '#' || a == 'b' || a) */ pointcolour = blackGC; - XDrawPoint (display->display, d, pointcolour, x, y); + XDrawPoint (xdisp, d, pointcolour, x, y); } } return d; diff --git a/src/scrollbar-plain.C b/src/scrollbar-plain.C
--- a/src/scrollbar-plain.C +++ b/src/scrollbar-plain.C @@ -40,7 +40,7 @@ rxvt_term::scrollbar_show_plain (int update, int last_top, int last_bot, int scr scrollBar.init |= R_SB_PLAIN; gcvalue.foreground = pix_colors_focused[Color_scroll]; - pscrollbarGC = XCreateGC (display->display, scrollBar.win, + pscrollbarGC = XCreateGC (xdisp, scrollBar.win, GCForeground, &gcvalue); } @@ -49,20 +49,20 @@ rxvt_term::scrollbar_show_plain (int update, int last_top, int last_bot, int scr if (update) { if (last_top < scrollBar.top) - XClearArea (display->display, scrollBar.win, + XClearArea (xdisp, scrollBar.win, sb_shadow + xsb, last_top, sbwidth + 1, (scrollBar.top - last_top), False); if (scrollBar.bot < last_bot) - XClearArea (display->display, scrollBar.win, + XClearArea (xdisp, scrollBar.win, sb_shadow + xsb, scrollBar.bot, sbwidth + 1, (last_bot - scrollBar.bot), False); } else - XClearWindow (display->display, scrollBar.win); + XClearWindow (xdisp, scrollBar.win); /* scrollbar slider */ - XFillRectangle (display->display, scrollBar.win, pscrollbarGC, + XFillRectangle (xdisp, scrollBar.win, pscrollbarGC, xsb + 1, scrollBar.top, sbwidth, scrollbar_len); return 1; diff --git a/src/scrollbar-rxvt.C b/src/scrollbar-rxvt.C
--- a/src/scrollbar-rxvt.C +++ b/src/scrollbar-rxvt.C @@ -40,10 +40,10 @@ draw_shadow (rxvt_term *term, int x, int y, int w, int h) for (; shadow-- > 0; x++, y++, w--, h--) { - XDrawLine (term->display->display, term->scrollBar.win, term->topShadowGC, x, y, w, y); - XDrawLine (term->display->display, term->scrollBar.win, term->topShadowGC, x, y, x, h); - XDrawLine (term->display->display, term->scrollBar.win, term->botShadowGC, w, h, w, y + 1); - XDrawLine (term->display->display, term->scrollBar.win, term->botShadowGC, w, h, x + 1, h); + XDrawLine (term->xdisp, term->scrollBar.win, term->topShadowGC, x, y, w, y); + XDrawLine (term->xdisp, term->scrollBar.win, term->topShadowGC, x, y, x, h); + XDrawLine (term->xdisp, term->scrollBar.win, term->botShadowGC, w, h, w, y + 1); + XDrawLine (term->xdisp, term->scrollBar.win, term->botShadowGC, w, h, x + 1, h); } } @@ -87,17 +87,17 @@ draw_button (rxvt_term *term, int x, int y, int state, int dirn) pt[2].y = y + sz - 1; } - XFillPolygon (term->display->display, term->scrollBar.win, term->scrollbarGC, + XFillPolygon (term->xdisp, term->scrollBar.win, term->scrollbarGC, pt, 3, Convex, CoordModeOrigin); /* draw base */ - XDrawLine (term->display->display, term->scrollBar.win, (dirn == UP ? bot : top), + XDrawLine (term->xdisp, term->scrollBar.win, (dirn == UP ? bot : top), pt[0].x, pt[0].y, pt[1].x, pt[1].y); /* draw shadow on left */ pt[1].x = x + sz2 - 1; pt[1].y = y + (dirn == UP ? 0 : sz - 1); - XDrawLine (term->display->display, term->scrollBar.win, top, + XDrawLine (term->xdisp, term->scrollBar.win, top, pt[0].x, pt[0].y, pt[1].x, pt[1].y); #if SHADOW_WIDTH > 1 @@ -115,7 +115,7 @@ draw_button (rxvt_term *term, int x, int y, int state, int dirn) pt[1].y--; } - XDrawLine (term->display->display, term->scrollBar.win, top, + XDrawLine (term->xdisp, term->scrollBar.win, top, pt[0].x, pt[0].y, pt[1].x, pt[1].y); #endif @@ -124,7 +124,7 @@ draw_button (rxvt_term *term, int x, int y, int state, int dirn) /* pt[2].x = x + sz2; */ pt[1].y = y + (dirn == UP ? sz - 1 : 0); pt[2].y = y + (dirn == UP ? 0 : sz - 1); - XDrawLine (term->display->display, term->scrollBar.win, bot, + XDrawLine (term->xdisp, term->scrollBar.win, bot, pt[2].x, pt[2].y, pt[1].x, pt[1].y); #if SHADOW_WIDTH > 1 @@ -141,7 +141,7 @@ draw_button (rxvt_term *term, int x, int y, int state, int dirn) pt[1].y++; } - XDrawLine (term->display->display, term->scrollBar.win, bot, + XDrawLine (term->xdisp, term->scrollBar.win, bot, pt[2].x, pt[2].y, pt[1].x, pt[1].y); #endif } @@ -158,8 +158,8 @@ rxvt_term::scrollbar_show_rxvt (int update, int last_top, int last_bot, int scro if (sbshadow) { - XSetWindowBackground (display->display, scrollBar.win, pix_colors_focused[Color_trough]); - XClearWindow (display->display, scrollBar.win); + XSetWindowBackground (xdisp, scrollBar.win, pix_colors_focused[Color_trough]); + XClearWindow (xdisp, scrollBar.win); } } else @@ -167,19 +167,19 @@ rxvt_term::scrollbar_show_rxvt (int update, int last_top, int last_bot, int scro if (update) { if (last_top < scrollBar.top) - XClearArea (display->display, scrollBar.win, + XClearArea (xdisp, scrollBar.win, sbshadow, last_top, sbwidth, (scrollBar.top - last_top), False); if (scrollBar.bot < last_bot) - XClearArea (display->display, scrollBar.win, + XClearArea (xdisp, scrollBar.win, sbshadow, scrollBar.bot, sbwidth, (last_bot - scrollBar.bot), False); } else - XClearWindow (display->display, scrollBar.win); + XClearWindow (xdisp, scrollBar.win); } /* scrollbar slider */ @@ -192,12 +192,12 @@ rxvt_term::scrollbar_show_rxvt (int update, int last_top, int last_bot, int scro else xofs = sbshadow ? sbwidth : sbwidth - 1; - XDrawLine (display->display, scrollBar.win, botShadowGC, + XDrawLine (xdisp, scrollBar.win, botShadowGC, xofs, 0, xofs, scrollBar.end + sbwidth); } #endif - XFillRectangle (display->display, scrollBar.win, scrollbarGC, + XFillRectangle (xdisp, scrollBar.win, scrollbarGC, sbshadow, scrollBar.top, sbwidth, scrollbar_len); diff --git a/src/scrollbar-xterm.C b/src/scrollbar-xterm.C
--- a/src/scrollbar-xterm.C +++ b/src/scrollbar-xterm.C @@ -42,7 +42,7 @@ rxvt_term::scrollbar_show_xterm (int update, int last_top, int last_bot, int scr XGCValues gcvalue; scrollBar.init |= R_SB_XTERM; - gcvalue.stipple = XCreateBitmapFromData (display->display, scrollBar.win, + gcvalue.stipple = XCreateBitmapFromData (xdisp, scrollBar.win, (char *)x_stp_bits, x_stp_width, x_stp_height); if (!gcvalue.stipple) @@ -52,34 +52,34 @@ rxvt_term::scrollbar_show_xterm (int update, int last_top, int last_bot, int scr gcvalue.foreground = pix_colors_focused[Color_fg]; gcvalue.background = pix_colors_focused[Color_bg]; - xscrollbarGC = XCreateGC (display->display, scrollBar.win, + xscrollbarGC = XCreateGC (xdisp, scrollBar.win, GCForeground | GCBackground | GCFillStyle | GCStipple, &gcvalue); gcvalue.foreground = pix_colors_focused[Color_border]; - ShadowGC = XCreateGC (display->display, scrollBar.win, GCForeground, &gcvalue); + ShadowGC = XCreateGC (xdisp, scrollBar.win, GCForeground, &gcvalue); } if (update) { xsb = OPTION (Opt_scrollBar_right) ? 1 : 0; if (last_top < scrollBar.top) - XClearArea (display->display, scrollBar.win, + XClearArea (xdisp, scrollBar.win, sb_shadow + xsb, last_top, sbwidth, (scrollBar.top - last_top), False); if (scrollBar.bot < last_bot) - XClearArea (display->display, scrollBar.win, + XClearArea (xdisp, scrollBar.win, sb_shadow + xsb, scrollBar.bot, sbwidth, (last_bot - scrollBar.bot), False); } else - XClearWindow (display->display, scrollBar.win); + XClearWindow (xdisp, scrollBar.win); /* scrollbar slider */ - XFillRectangle (display->display, scrollBar.win, xscrollbarGC, + XFillRectangle (xdisp, scrollBar.win, xscrollbarGC, xsb + 1, scrollBar.top, sbwidth - 2, scrollbar_len); - XDrawLine (display->display, scrollBar.win, ShadowGC, + XDrawLine (xdisp, scrollBar.win, ShadowGC, xsb ? 0 : sbwidth, scrollBar.beg, xsb ? 0 : sbwidth, scrollBar.end); return 1; diff --git a/src/scrollbar.C b/src/scrollbar.C
--- a/src/scrollbar.C +++ b/src/scrollbar.C @@ -46,14 +46,14 @@ rxvt_term::scrollbar_mapping (int map) if (scrollBar.win) { - XMapWindow (display->display, scrollBar.win); + XMapWindow (xdisp, scrollBar.win); change = 1; } } else { scrollBar.state = 0; - XUnmapWindow (display->display, scrollBar.win); + XUnmapWindow (xdisp, scrollBar.win); change = 1; } #endif @@ -111,7 +111,7 @@ rxvt_term::resize_scrollbar () if (!scrollBar.win) { /* create the scrollbar window */ - scrollBar.win = XCreateSimpleWindow (display->display, + scrollBar.win = XCreateSimpleWindow (xdisp, parent[0], window_sb_x, 0, scrollbar_TotalWidth (), @@ -119,9 +119,9 @@ rxvt_term::resize_scrollbar () 0, pix_colors[Color_fg], pix_colors[Color_border]); - XDefineCursor (display->display, scrollBar.win, leftptr_cursor); + XDefineCursor (xdisp, scrollBar.win, leftptr_cursor); - XSelectInput (display->display, scrollBar.win, + XSelectInput (xdisp, scrollBar.win, ExposureMask | ButtonPressMask | ButtonReleaseMask | Button1MotionMask | Button2MotionMask | Button3MotionMask); @@ -133,7 +133,7 @@ rxvt_term::resize_scrollbar () scrollbar_show (1); if (delayed_init) - XMapWindow (display->display, scrollBar.win); + XMapWindow (xdisp, scrollBar.win); #endif } diff --git a/src/xdefaults.C b/src/xdefaults.C
--- a/src/xdefaults.C +++ b/src/xdefaults.C @@ -766,7 +766,7 @@ get_res (XrmDatabase database, const char *program, const char *option) const char * rxvt_term::x_resource (const char *name) { - XrmDatabase database = XrmGetDatabase (display->display); + XrmDatabase database = XrmGetDatabase (xdisp); const char *p = get_res (database, rs[Rs_name], name); const char *p0 = get_res (database, "!INVALIDPROGRAMMENAMEDONTMATCH!", name); @@ -828,7 +828,7 @@ rxvt_term::extract_resources () * [R5 or later]: enumerate the resource database */ # ifdef KEYSYM_RESOURCE - XrmDatabase database = XrmGetDatabase (display->display); + XrmDatabase database = XrmGetDatabase (xdisp); XrmName name_prefix[3]; XrmClass class_prefix[3]; diff --git a/src/xpm.C b/src/xpm.C
--- a/src/xpm.C +++ b/src/xpm.C @@ -355,11 +355,11 @@ rxvt_term::set_bgPixmap (const char *file) if (bgPixmap.pixmap != None) { - XFreePixmap (display->display, bgPixmap.pixmap); + XFreePixmap (xdisp, bgPixmap.pixmap); bgPixmap.pixmap = None; } - XSetWindowBackground (display->display, vt, pix_colors[Color_bg]); + XSetWindowBackground (xdisp, vt, pix_colors[Color_bg]); if (*file != '\0') { @@ -368,7 +368,7 @@ rxvt_term::set_bgPixmap (const char *file) /* * we already have the required attributes */ - /* XGetWindowAttributes (display->display, vt, &attr); */ + /* XGetWindowAttributes (xdisp, vt, &attr); */ xpmAttr.closeness = 30000; xpmAttr.colormap = cmap; @@ -380,7 +380,7 @@ rxvt_term::set_bgPixmap (const char *file) /* search environment variables here too */ f = (char *)rxvt_File_find (file, ".xpm", rs[Rs_path]); if (f == NULL - || XpmReadFileToPixmap (display->display, display->root, f, + || XpmReadFileToPixmap (xdisp, display->root, f, &bgPixmap.pixmap, NULL, &xpmAttr)) {
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 10:27:17 2024