From: root Date: Thu, 2 Feb 2006 18:00:23 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=3fd660d13eea1674f9c6ad9f4bda02a540e4b1b9;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/src/main.C b/src/main.C index f5d28375..b2e4c37b 100644 --- a/src/main.C +++ b/src/main.C @@ -1110,6 +1110,9 @@ rxvt_term::resize_all_windows (unsigned int newwidth, unsigned int newheight, in if (fix_screen || old_height == 0) scr_reset (); + // TODO, with nvidia-8178, resizes kill the alpha channel, report if not fixed in newer version + //scr_touch (false); + #ifdef XPM_BACKGROUND if (pixmap) scr_touch (false); diff --git a/src/rxvt.h b/src/rxvt.h index 48244d37..d6ef5381 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -1097,7 +1097,7 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen { void vt_select_input () const NOTHROW { - XSelectInput (xdisp, vt, vt_emask | vt_emask_perl | vt_emask_xim); + XSelectInput (dpy, vt, vt_emask | vt_emask_perl | vt_emask_xim); } #if TRANSPARENT diff --git a/src/rxvtfont.C b/src/rxvtfont.C index 16402068..13b47858 100644 --- a/src/rxvtfont.C +++ b/src/rxvtfont.C @@ -160,7 +160,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->xdisp +#define dTermDisplay Display *disp = term->dpy #define dTermGC GC gc = term->gc ///////////////////////////////////////////////////////////////////////////// @@ -175,7 +175,7 @@ rxvt_drawable::~rxvt_drawable () rxvt_drawable::operator XftDraw *() { if (!xftdrawable) - xftdrawable = XftDrawCreate (screen->xdisp, drawable, screen->visual, screen->cmap); + xftdrawable = XftDrawCreate (screen->dpy, drawable, screen->visual, screen->cmap); return xftdrawable; } @@ -516,7 +516,7 @@ rxvt_font_x11::get_property (XFontStruct *f, Atom property, const char *repl) co unsigned long value; if (XGetFontProperty (f, property, &value)) - return XGetAtomName (term->xdisp, value); + return XGetAtomName (term->dpy, value); else return rxvt_strdup (repl); } @@ -549,7 +549,7 @@ rxvt_font_x11::set_properties (rxvt_fontprop &p, XFontStruct *f) unsigned long height; #if 0 - if (!XGetFontProperty (f, XInternAtom (term->xdisp, "PIXEL_SIZE", 0), &height)) + if (!XGetFontProperty (f, XInternAtom (term->dpy, "PIXEL_SIZE", 0), &height)) return false; #else height = f->ascent + f->descent; @@ -894,7 +894,7 @@ rxvt_font_x11::clear () { if (f) { - XFreeFont (term->xdisp, f); + XFreeFont (term->dpy, f); f = 0; } } @@ -1076,7 +1076,7 @@ rxvt_font_xft::clear () { if (f) { - XftFontClose (term->xdisp, f); + XftFontClose (term->dpy, f); f = 0; } } @@ -1253,7 +1253,7 @@ rxvt_font_xft::has_char (unicode_t unicode, const rxvt_fontprop *prop, bool &car { careful = false; - if (!XftCharExists (term->xdisp, f, unicode)) + if (!XftCharExists (term->dpy, f, unicode)) return false; if (!prop || prop->width == rxvt_fontprop::unset) @@ -1262,7 +1262,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->xdisp, f, &ch, 1, &g); + XftTextExtents32 (term->dpy, f, &ch, 1, &g); int w = g.width - g.x; int wcw = max (WCWIDTH (unicode), 1); @@ -1578,7 +1578,7 @@ rxvt_fontset::find_font (unicode_t unicode) //FcPatternAddBool (p, FC_ANTIALIAS, 1); XftResult result; - FcPattern *match = XftFontMatch (term->xdisp, term->display->screen, p, &result); + FcPattern *match = XftFontMatch (term->dpy, term->display->screen, p, &result); FcPatternDestroy (p); diff --git a/src/rxvttoolkit.C b/src/rxvttoolkit.C index 8e5ce55a..42d2080c 100644 --- a/src/rxvttoolkit.C +++ b/src/rxvttoolkit.C @@ -179,7 +179,7 @@ rxvt_xim::ref_init () { display = GET_R->display; //HACK: TODO - xim = XOpenIM (display->display, 0, 0, 0); + xim = XOpenIM (display->dpy, 0, 0, 0); if (!xim) return false; @@ -207,9 +207,9 @@ void rxvt_screen::set (rxvt_display *disp) { display = disp; - xdisp = disp->display; + dpy = disp->dpy; - Screen *screen = ScreenOfDisplay (xdisp, disp->screen); + Screen *screen = ScreenOfDisplay (dpy, disp->screen); depth = DefaultDepthOfScreen (screen); visual = DefaultVisualOfScreen (screen); @@ -224,11 +224,11 @@ rxvt_screen::set (rxvt_display *disp, int bitdepth) #if XFT XVisualInfo vinfo; - if (XMatchVisualInfo (xdisp, display->screen, bitdepth, TrueColor, &vinfo)) + if (XMatchVisualInfo (dpy, display->screen, bitdepth, TrueColor, &vinfo)) { depth = bitdepth; visual = vinfo.visual; - cmap = XCreateColormap (xdisp, disp->root, visual, AllocNone); + cmap = XCreateColormap (dpy, disp->root, visual, AllocNone); } #endif } @@ -236,8 +236,8 @@ rxvt_screen::set (rxvt_display *disp, int bitdepth) void rxvt_screen::clear () { - if (cmap != DefaultColormapOfScreen (ScreenOfDisplay (xdisp, display->screen))) - XFreeColormap (xdisp, cmap); + if (cmap != DefaultColormapOfScreen (ScreenOfDisplay (dpy, display->screen))) + XFreeColormap (dpy, cmap); } ///////////////////////////////////////////////////////////////////////////// @@ -288,11 +288,11 @@ rxvt_display::get_resources (bool refresh) char *val = 0; #if XLIB_ILLEGAL_ACCESS - if (display->xdefaults) - XFree (display->xdefaults); + if (dpy->xdefaults) + XFree (dpy->xdefaults); #endif - if (XGetWindowProperty (display, root, XA_RESOURCE_MANAGER, + if (XGetWindowProperty (dpy, root, XA_RESOURCE_MANAGER, 0L, 100000000L, False, XA_STRING, &actual_type, &actual_format, &nitems, &nremaining, @@ -308,11 +308,11 @@ rxvt_display::get_resources (bool refresh) } #if XLIB_ILLEGAL_ACCESS - display->xdefaults = displayResource; + dpy->xdefaults = displayResource; #endif } else - displayResource = XResourceManagerString (display); + displayResource = XResourceManagerString (dpy); if (displayResource) { @@ -333,7 +333,7 @@ rxvt_display::get_resources (bool refresh) #endif /* Get screen specific resources */ - displayResource = XScreenResourceString (ScreenOfDisplay (display, screen)); + displayResource = XScreenResourceString (ScreenOfDisplay (dpy, screen)); if (displayResource) { @@ -373,39 +373,39 @@ bool rxvt_display::ref_init () val = rxvt_malloc (5 + strlen (id) + 1); strcpy (val, "unix/"); strcat (val, id); - display = XOpenDisplay (val); + dpy = XOpenDisplay (val); free (val); } else #endif - display = 0; + dpy = 0; - if (!display) - display = XOpenDisplay (id); + if (!dpy) + dpy = XOpenDisplay (id); - if (!display) + if (!dpy) return false; - screen = DefaultScreen (display); - root = DefaultRootWindow (display); + screen = DefaultScreen (dpy); + root = DefaultRootWindow (dpy); assert (sizeof (xa_names) / sizeof (char *) == NUM_XA); - XInternAtoms (display, (char **)xa_names, NUM_XA, False, xa); + XInternAtoms (dpy, (char **)xa_names, NUM_XA, False, xa); - XrmSetDatabase (display, get_resources (false)); + XrmSetDatabase (dpy, get_resources (false)); #ifdef POINTER_BLANK XColor blackcolour; blackcolour.red = 0; blackcolour.green = 0; blackcolour.blue = 0; - Font f = XLoadFont (display, "fixed"); - blank_cursor = XCreateGlyphCursor (display, f, f, ' ', ' ', + Font f = XLoadFont (dpy, "fixed"); + blank_cursor = XCreateGlyphCursor (dpy, f, f, ' ', ' ', &blackcolour, &blackcolour); - XUnloadFont (display, f); + XUnloadFont (dpy, f); #endif - int fd = XConnectionNumber (display); + int fd = XConnectionNumber (dpy); #ifndef NO_SLOW_LINK_SUPPORT // try to detect wether we have a local connection. @@ -422,7 +422,7 @@ bool rxvt_display::ref_init () x_ev.start (fd, EVENT_READ); fcntl (fd, F_SETFD, FD_CLOEXEC); - XSelectInput (display, root, PropertyChangeMask); + XSelectInput (dpy, root, PropertyChangeMask); flush (); @@ -434,23 +434,23 @@ rxvt_display::ref_next () { // TODO: somehow check wether the database files/resources changed // before affording re-loading/parsing - XrmDestroyDatabase (XrmGetDatabase (display)); - XrmSetDatabase (display, get_resources (true)); + XrmDestroyDatabase (XrmGetDatabase (dpy)); + XrmSetDatabase (dpy, get_resources (true)); } rxvt_display::~rxvt_display () { - if (!display) + if (!dpy) return; #ifdef POINTER_BLANK - XFreeCursor (display, blank_cursor); + XFreeCursor (dpy, blank_cursor); #endif x_ev.stop (); #ifdef USE_XIM xims.clear (); #endif - XCloseDisplay (display); + XCloseDisplay (dpy); } #ifdef USE_XIM @@ -468,7 +468,7 @@ void rxvt_display::im_change_check () int actual_format; unsigned long nitems, bytes_after; - if (XGetWindowProperty (display, root, xa[XA_XIM_SERVERS], 0L, 1000000L, + if (XGetWindowProperty (dpy, root, xa[XA_XIM_SERVERS], 0L, 1000000L, False, XA_ATOM, &actual_type, &actual_format, &nitems, &bytes_after, (unsigned char **)&atoms) != Success ) @@ -476,7 +476,7 @@ void rxvt_display::im_change_check () if (actual_type == XA_ATOM && actual_format == 32) for (int i = 0; i < nitems; i++) - if (XGetSelectionOwner (display, atoms[i])) + if (XGetSelectionOwner (dpy, atoms[i])) { im_change_cb (); break; @@ -491,7 +491,7 @@ void rxvt_display::x_cb (io_watcher &w, short revents) do { XEvent xev; - XNextEvent (display, &xev); + XNextEvent (dpy, &xev); #ifdef USE_XIM if (!XFilterEvent (&xev, None)) @@ -512,17 +512,17 @@ void rxvt_display::x_cb (io_watcher &w, short revents) } #endif } - while (XEventsQueued (display, QueuedAlready)); + while (XEventsQueued (dpy, QueuedAlready)); - XFlush (display); + XFlush (dpy); } void rxvt_display::flush () { - if (XEventsQueued (display, QueuedAlready)) + if (XEventsQueued (dpy, QueuedAlready)) x_cb (x_ev, EVENT_READ); - XFlush (display); + XFlush (dpy); } void rxvt_display::reg (xevent_watcher *w) @@ -589,7 +589,7 @@ void rxvt_display::put_xim (rxvt_xim *xim) Atom rxvt_display::atom (const char *name) { - return XInternAtom (display, name, False); + return XInternAtom (dpy, name, False); } ///////////////////////////////////////////////////////////////////////////// @@ -609,7 +609,7 @@ rxvt_color::alloc (rxvt_screen *screen, const rgba &color) // Transparency users should eat shit and die, and then // XRenderQueryPictIndexValues themselves plenty. if ((screen->visual->c_class == TrueColor) - && (format = XRenderFindVisualFormat (screen->xdisp, screen->visual))) + && (format = XRenderFindVisualFormat (screen->dpy, screen->visual))) { // the fun lies in doing everything manually... c.color.red = color.r; @@ -633,7 +633,7 @@ rxvt_color::alloc (rxvt_screen *screen, const rgba &color) d.blue = color.b; d.alpha = color.a; - return XftColorAllocValue (screen->xdisp, screen->visual, screen->cmap, &d, &c); + return XftColorAllocValue (screen->dpy, screen->visual, screen->cmap, &d, &c); } #else c.red = color.r; @@ -651,12 +651,12 @@ rxvt_color::alloc (rxvt_screen *screen, const rgba &color) return true; } - else if (XAllocColor (screen->xdisp, screen->cmap, &c)) + else if (XAllocColor (screen->dpy, screen->cmap, &c)) return true; else c.pixel = (color.r + color.g + color.b) > 128*3 - ? WhitePixelOfScreen (DefaultScreenOfDisplay (screen->xdisp)) - : BlackPixelOfScreen (DefaultScreenOfDisplay (screen->xdisp)); + ? WhitePixelOfScreen (DefaultScreenOfDisplay (screen->dpy)) + : BlackPixelOfScreen (DefaultScreenOfDisplay (screen->dpy)); #endif return false; @@ -683,7 +683,7 @@ rxvt_color::set (rxvt_screen *screen, const char *name) { XColor xc, xc_exact; - if (XParseColor (screen->xdisp, screen->cmap, name, &xc)) + if (XParseColor (screen->dpy, screen->cmap, name, &xc)) { c.r = xc.red; c.g = xc.green; @@ -721,7 +721,7 @@ rxvt_color::set (rxvt_screen *screen, const rgba &color) // many kilobytes transfer per colour, but pseudocolor isn't worth // many extra optimisations. - XQueryColors (screen->xdisp, screen->cmap, colors, cmap_size); + XQueryColors (screen->dpy, screen->cmap, colors, cmap_size); int diff = 0x7fffffffUL; XColor *best = colors; @@ -783,9 +783,9 @@ void rxvt_color::free (rxvt_screen *screen) { #if XFT - XftColorFree (screen->xdisp, screen->visual, screen->cmap, &c); + XftColorFree (screen->dpy, screen->visual, screen->cmap, &c); #else - XFreeColors (screen->xdisp, screen->cmap, &c.pixel, 1, AllPlanes); + XFreeColors (screen->dpy, screen->cmap, &c.pixel, 1, AllPlanes); #endif } diff --git a/src/rxvttoolkit.h b/src/rxvttoolkit.h index d5c63aef..4314289c 100644 --- a/src/rxvttoolkit.h +++ b/src/rxvttoolkit.h @@ -123,7 +123,7 @@ struct rxvt_xim : refcounted { struct rxvt_screen { rxvt_display *display; - Display *xdisp; + Display *dpy; int depth; Visual *visual; Colormap cmap; @@ -147,7 +147,7 @@ struct rxvt_display : refcounted { #endif //public - Display *display; + Display *dpy; int screen; Window root; rxvt_term *selection_owner; diff --git a/src/screen.C b/src/screen.C index 81f869c4..0d6d5245 100644 --- 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 (xdisp, drawBuffer, 0, \ + XClearArea (dpy, drawBuffer, 0, \ Row2Pixel (row), (unsigned int)width, \ (unsigned int)Height2Pixel (num), False) #define CLEAR_CHARS(x, y, num) \ if (mapped) \ - XClearArea (xdisp, drawBuffer, x, y, \ + XClearArea (dpy, drawBuffer, x, y, \ (unsigned int)Width2Pixel (num), \ (unsigned int)Height2Pixel (1), False) #define ERASE_ROWS(row, num) \ - XFillRectangle (xdisp, drawBuffer, gc, \ + XFillRectangle (dpy, drawBuffer, gc, \ 0, Row2Pixel (row), \ (unsigned int)width, \ (unsigned int)Height2Pixel (num)) @@ -1344,10 +1344,10 @@ rxvt_term::scr_erase_screen (int mode) NOTHROW { ren = rstyle & (RS_fgMask | RS_bgMask); gcvalue.foreground = pix_colors[bgcolor_of (rstyle)]; - XChangeGC (xdisp, gc, GCForeground, &gcvalue); + XChangeGC (dpy, gc, GCForeground, &gcvalue); ERASE_ROWS (row, num); gcvalue.foreground = pix_colors[Color_fg]; - XChangeGC (xdisp, gc, GCForeground, &gcvalue); + XChangeGC (dpy, gc, GCForeground, &gcvalue); } for (; num--; row++) @@ -1656,12 +1656,12 @@ rxvt_term::scr_rvideo_mode (bool on) NOTHROW #if TRANSPARENT if (!OPTION (Opt_transparent) || am_transparent == 0) #endif - XSetWindowBackground (xdisp, vt, pix_colors[Color_bg]); + XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); XGCValues gcvalue; gcvalue.foreground = pix_colors[Color_fg]; gcvalue.background = pix_colors[Color_bg]; - XChangeGC (xdisp, gc, GCBackground | GCForeground, &gcvalue); + XChangeGC (dpy, gc, GCBackground | GCForeground, &gcvalue); scr_clear (); scr_touch (true); @@ -1890,7 +1890,7 @@ rxvt_term::scr_bell () NOTHROW # ifdef MAPALERT_OPTION if (OPTION (Opt_mapAlert)) # endif - XMapWindow (xdisp, parent[0]); + XMapWindow (dpy, parent[0]); # endif if (OPTION (Opt_visualBell)) @@ -1902,7 +1902,7 @@ rxvt_term::scr_bell () NOTHROW bell_ev.start (NOW + VISUAL_BELL_DURATION); } else - XBell (xdisp, 0); + XBell (dpy, 0); #endif } @@ -2151,7 +2151,7 @@ rxvt_term::scr_refresh () NOTHROW if (wlen < len) ::swap (wlen, len); - XCopyArea (xdisp, vt, vt, + XCopyArea (dpy, vt, vt, gc, 0, Row2Pixel (len + i), (unsigned int)this->width, (unsigned int)Height2Pixel (wlen - len + 1), @@ -2355,12 +2355,12 @@ rxvt_term::scr_refresh () NOTHROW { #if ENABLE_FRILLS if (ISSET_PIXCOLOR (Color_underline)) - XSetForeground (xdisp, gc, pix_colors[Color_underline]); + XSetForeground (dpy, gc, pix_colors[Color_underline]); else #endif - XSetForeground (xdisp, gc, pix_colors[fore]); + XSetForeground (dpy, gc, pix_colors[fore]); - XDrawLine (xdisp, drawBuffer, gc, + XDrawLine (dpy, drawBuffer, gc, xpixel, ypixel + font->ascent + 1, xpixel + Width2Pixel (count) - 1, ypixel + font->ascent + 1); } @@ -2403,10 +2403,10 @@ rxvt_term::scr_refresh () NOTHROW #ifndef NO_CURSORCOLOR if (ISSET_PIXCOLOR (Color_cursor)) - XSetForeground (xdisp, gc, pix_colors[Color_cursor]); + XSetForeground (dpy, gc, pix_colors[Color_cursor]); #endif - XDrawRectangle (xdisp, drawBuffer, gc, + XDrawRectangle (dpy, drawBuffer, gc, Col2Pixel (col), Row2Pixel (oldcursor.row), (unsigned int) (Width2Pixel (cursorwidth) - 1), @@ -2460,13 +2460,13 @@ rxvt_term::scr_recolour () NOTHROW #endif ) { - XSetWindowBackground (xdisp, parent[0], pix_colors[Color_border]); - XClearWindow (xdisp, parent[0]); - XSetWindowBackground (xdisp, vt, pix_colors[Color_bg]); + XSetWindowBackground (dpy, parent[0], pix_colors[Color_border]); + XClearWindow (dpy, parent[0]); + XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); #if HAVE_SCROLLBARS if (scrollBar.win) { - XSetWindowBackground (xdisp, scrollBar.win, pix_colors[Color_border]); + XSetWindowBackground (dpy, scrollBar.win, pix_colors[Color_border]); scrollBar.setIdle (); scrollbar_show (0); } @@ -2489,7 +2489,7 @@ rxvt_term::scr_clear (bool really) NOTHROW want_refresh = 1; if (really) - XClearWindow (xdisp, vt); + XClearWindow (dpy, vt); } void @@ -2674,7 +2674,7 @@ rxvt_term::selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW unsigned long bytes_after; XTextProperty ct; - if (XGetWindowProperty (xdisp, win, prop, + if (XGetWindowProperty (dpy, win, prop, 0, PROP_SIZE / 4, delete_prop, AnyPropertyType, &ct.encoding, &ct.format, @@ -2693,7 +2693,7 @@ rxvt_term::selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW // fetch and append remaining data XTextProperty ct2; - if (XGetWindowProperty (xdisp, win, prop, + if (XGetWindowProperty (dpy, win, prop, ct.nitems / 4, (bytes_after + 3) / 4, delete_prop, AnyPropertyType, &ct2.encoding, &ct2.format, @@ -2716,7 +2716,7 @@ rxvt_term::selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW { // INCR selection, start handshake if (!delete_prop) - XDeleteProperty (xdisp, win, prop); + XDeleteProperty (dpy, win, prop); selection_wait = Sel_incr; incr_buf_fill = 0; @@ -2787,7 +2787,7 @@ rxvt_term::selection_paste (Window win, Atom prop, bool delete_prop) NOTHROW } else #endif - if (XmbTextPropertyToTextList (xdisp, &ct, &cl, &cr) >= 0 + if (XmbTextPropertyToTextList (dpy, &ct, &cl, &cr) >= 0 && cl) { for (int i = 0; i < cr; i++) @@ -2879,9 +2879,9 @@ rxvt_term::selection_request_other (Atom target, int selnum) NOTHROW else sel = xa[XA_CLIPBOARD]; - if (XGetSelectionOwner (xdisp, sel) != None) + if (XGetSelectionOwner (dpy, sel) != None) { - XConvertSelection (xdisp, sel, target, xa[XA_VT_SELECTION], + XConvertSelection (dpy, sel, target, xa[XA_VT_SELECTION], vt, selection_request_time); return 1; } @@ -3044,8 +3044,8 @@ rxvt_term::selection_grab (Time tm) NOTHROW { selection_time = tm; - XSetSelectionOwner (xdisp, XA_PRIMARY, vt, tm); - if (XGetSelectionOwner (xdisp, XA_PRIMARY) == vt) + XSetSelectionOwner (dpy, XA_PRIMARY, vt, tm); + if (XGetSelectionOwner (dpy, XA_PRIMARY) == vt) { display->set_selection_owner (this); return true; @@ -3059,7 +3059,7 @@ rxvt_term::selection_grab (Time tm) NOTHROW #if 0 XTextProperty ct; - if (XwcTextListToTextProperty (xdisp, &selection.text, 1, XStringStyle, &ct) >= 0) + if (XwcTextListToTextProperty (dpy, &selection.text, 1, XStringStyle, &ct) >= 0) { set_string_property (XA_CUT_BUFFER0, ct.value, ct.nitems); XFree (ct.value); @@ -3542,7 +3542,7 @@ rxvt_term::selection_send (const XSelectionRequestEvent &rq) NOTHROW *target++ = xa[XA_UTF8_STRING]; #endif - XChangeProperty (xdisp, rq.requestor, rq.property, XA_ATOM, + XChangeProperty (dpy, rq.requestor, rq.property, XA_ATOM, 32, PropModeReplace, (unsigned char *)target_list, target - target_list); ev.property = rq.property; @@ -3555,7 +3555,7 @@ rxvt_term::selection_send (const XSelectionRequestEvent &rq) NOTHROW #endif else if (rq.target == xa[XA_TIMESTAMP] && selection.text) { - XChangeProperty (xdisp, rq.requestor, rq.property, rq.target, + XChangeProperty (dpy, rq.requestor, rq.property, rq.target, 32, PropModeReplace, (unsigned char *)&selection_time, 1); ev.property = rq.property; } @@ -3623,7 +3623,7 @@ rxvt_term::selection_send (const XSelectionRequestEvent &rq) NOTHROW } else #endif - if (XwcTextListToTextProperty (xdisp, &cl, 1, (XICCEncodingStyle) style, &ct) >= 0) + if (XwcTextListToTextProperty (dpy, &cl, 1, (XICCEncodingStyle) style, &ct) >= 0) freect = 1; else { @@ -3633,7 +3633,7 @@ rxvt_term::selection_send (const XSelectionRequestEvent &rq) NOTHROW ct.encoding = target; } - XChangeProperty (xdisp, rq.requestor, rq.property, + XChangeProperty (dpy, rq.requestor, rq.property, ct.encoding, 8, PropModeReplace, ct.value, (int)ct.nitems); ev.property = rq.property; @@ -3642,7 +3642,7 @@ rxvt_term::selection_send (const XSelectionRequestEvent &rq) NOTHROW XFree (ct.value); } - XSendEvent (xdisp, rq.requestor, False, 0L, (XEvent *)&ev); + XSendEvent (dpy, rq.requestor, False, 0L, (XEvent *)&ev); } /* ------------------------------------------------------------------------- * @@ -3668,7 +3668,7 @@ rxvt_term::im_set_position (XPoint &pos) NOTHROW { XWindowAttributes xwa; - XGetWindowAttributes (xdisp, vt, &xwa); + XGetWindowAttributes (dpy, 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 index d870ab35..5169220e 100644 --- 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 (xdisp, scrollBar.win, width, height, depth); + d = XCreatePixmap (dpy, 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 (xdisp, d, pointcolour, x, y); + XDrawPoint (dpy, d, pointcolour, x, y); } } return d; @@ -155,11 +155,11 @@ rxvt_term::init_scrollbar_stuff () gcvalue.graphics_exposures = False; gcvalue.foreground = pix_colors_focused[Color_Black]; - blackGC = XCreateGC (xdisp, scrollBar.win, + blackGC = XCreateGC (dpy, scrollBar.win, GCForeground | GCGraphicsExposures, &gcvalue); gcvalue.foreground = pix_colors_focused[Color_White]; - whiteGC = XCreateGC (xdisp, scrollBar.win, + whiteGC = XCreateGC (dpy, scrollBar.win, GCForeground | GCGraphicsExposures, &gcvalue); xcol.red = 0xaeba; @@ -167,7 +167,7 @@ rxvt_term::init_scrollbar_stuff () xcol.blue = 0xaeba; xcol.pixel = pix_colors_focused[Color_scroll]; light = gcvalue.foreground = xcol.pixel; - grayGC = XCreateGC (xdisp, scrollBar.win, + grayGC = XCreateGC (dpy, scrollBar.win, GCForeground | GCGraphicsExposures, &gcvalue); xcol.red = 0x51aa; @@ -176,10 +176,10 @@ rxvt_term::init_scrollbar_stuff () //if (!rXAllocColor (&xcol, "dark gray"))//TODO//D// xcol.pixel = pix_colors_focused[Color_Grey25]; dark = gcvalue.foreground = xcol.pixel; - darkGC = XCreateGC (xdisp, scrollBar.win, + darkGC = XCreateGC (dpy, scrollBar.win, GCForeground | GCGraphicsExposures, &gcvalue); - stipple = XCreateBitmapFromData (xdisp, scrollBar.win, + stipple = XCreateBitmapFromData (dpy, scrollBar.win, (char *)n_stp_bits, n_stp_width, n_stp_height); @@ -188,9 +188,9 @@ rxvt_term::init_scrollbar_stuff () gcvalue.fill_style = FillOpaqueStippled; gcvalue.stipple = stipple; - /* XSetWindowBackground (xdisp, scrollBar.win, pix_colors_focused[Color_Red]); */ + /* XSetWindowBackground (dpy, scrollBar.win, pix_colors_focused[Color_Red]); */ - stippleGC = XCreateGC (xdisp, scrollBar.win, + stippleGC = XCreateGC (dpy, scrollBar.win, GCForeground | GCBackground | GCStipple | GCFillStyle | GCGraphicsExposures, &gcvalue); @@ -216,15 +216,15 @@ rxvt_term::drawBevel (Drawable d, int x1, int y1, int w, int h) x2 = x1 + w - 1; /* right point */ y2 = y1 + h - 1; /* bottom point */ /* white top and left */ - XDrawLine (xdisp, d, whiteGC, x1, y1, x2, y1); - XDrawLine (xdisp, d, whiteGC, x1, y1, x1, y2); + XDrawLine (dpy, d, whiteGC, x1, y1, x2, y1); + XDrawLine (dpy, d, whiteGC, x1, y1, x1, y2); /* black bottom and right */ - XDrawLine (xdisp, d, blackGC, x1, y2, x2, y2); - XDrawLine (xdisp, d, blackGC, x2, y1, x2, y2); + XDrawLine (dpy, d, blackGC, x1, y2, x2, y2); + XDrawLine (dpy, d, blackGC, x2, y1, x2, y2); /* dark inside bottom and right */ x1++, y1++, x2--, y2--; /* move in one point */ - XDrawLine (xdisp, d, darkGC, x1, y2, x2, y2); - XDrawLine (xdisp, d, darkGC, x2, y1, x2, y2); + XDrawLine (dpy, d, darkGC, x1, y2, x2, y2); + XDrawLine (dpy, d, darkGC, x2, y1, x2, y2); } int @@ -241,32 +241,32 @@ rxvt_term::scrollbar_show_next (int update, int last_top, int last_bot, int scro if (top_row == 0 || !update) { - XFillRectangle (xdisp, scrollBar.win, grayGC, 0, 0, + XFillRectangle (dpy, scrollBar.win, grayGC, 0, 0, SB_WIDTH_NEXT + 1, height); - XDrawRectangle (xdisp, scrollBar.win, blackGC, 0, + XDrawRectangle (dpy, scrollBar.win, blackGC, 0, -SB_BORDER_WIDTH, SB_WIDTH_NEXT, height + SB_BORDER_WIDTH); - XFillRectangle (xdisp, scrollBar.win, stippleGC, + XFillRectangle (dpy, scrollBar.win, stippleGC, SB_LEFT_PADDING, 0, SB_BUTTON_WIDTH, height); } if (top_row) { if (last_top < scrollBar.top || !update) - XFillRectangle (xdisp, scrollBar.win, stippleGC, + XFillRectangle (dpy, scrollBar.win, stippleGC, SB_LEFT_PADDING, SB_PADDING + last_top, SB_BUTTON_WIDTH, scrollBar.top - last_top); if (scrollBar.bot < last_bot || !update) - XFillRectangle (xdisp, scrollBar.win, stippleGC, + XFillRectangle (dpy, scrollBar.win, stippleGC, SB_LEFT_PADDING, scrollBar.bot + SB_PADDING, SB_BUTTON_WIDTH, (last_bot - scrollBar.bot)); - XFillRectangle (xdisp, scrollBar.win, grayGC, + XFillRectangle (dpy, scrollBar.win, grayGC, SB_LEFT_PADDING, scrollBar.top + SB_PADDING, SB_BUTTON_WIDTH, scrollbar_len); - XCopyArea (xdisp, dimple, scrollBar.win, whiteGC, 0, 0, + XCopyArea (dpy, dimple, scrollBar.win, whiteGC, 0, 0, SCROLLER_DIMPLE_WIDTH, SCROLLER_DIMPLE_HEIGHT, (SB_WIDTH_NEXT - SCROLLER_DIMPLE_WIDTH) / 2, scrollBar.top + SB_BEVEL_WIDTH_UPPER_LEFT + @@ -283,12 +283,12 @@ rxvt_term::scrollbar_show_next (int update, int last_top, int last_bot, int scro SB_BUTTON_HEIGHT); s = (scrollbar_isUp ()) ? upArrowHi : upArrow; - XCopyArea (xdisp, s, scrollBar.win, whiteGC, 0, 0, + XCopyArea (dpy, s, scrollBar.win, whiteGC, 0, 0, ARROW_WIDTH, ARROW_HEIGHT, SB_BUTTON_FACE_X, height - SB_BUTTON_BOTH_HEIGHT + SB_BEVEL_WIDTH_UPPER_LEFT); s = (scrollbar_isDn ()) ? downArrowHi : downArrow; - XCopyArea (xdisp, s, scrollBar.win, whiteGC, 0, 0, + XCopyArea (dpy, s, scrollBar.win, whiteGC, 0, 0, ARROW_WIDTH, ARROW_HEIGHT, SB_BUTTON_FACE_X, height - SB_BUTTON_SINGLE_HEIGHT + SB_BEVEL_WIDTH_UPPER_LEFT); } diff --git a/src/scrollbar-plain.C b/src/scrollbar-plain.C index c236212b..4e92fe06 100644 --- 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 (xdisp, scrollBar.win, GCForeground, &gcvalue); + pscrollbarGC = XCreateGC (dpy, scrollBar.win, GCForeground, &gcvalue); } xsb = OPTION (Opt_scrollBar_right) ? 1 : 0; @@ -48,20 +48,20 @@ rxvt_term::scrollbar_show_plain (int update, int last_top, int last_bot, int scr if (update) { if (last_top < scrollBar.top) - XClearArea (xdisp, scrollBar.win, + XClearArea (dpy, scrollBar.win, sb_shadow, last_top, sbwidth + 1, scrollBar.top - last_top, False); if (scrollBar.bot < last_bot) - XClearArea (xdisp, scrollBar.win, + XClearArea (dpy, scrollBar.win, sb_shadow, scrollBar.bot, sbwidth + 1, last_bot - scrollBar.bot, False); } else - XClearWindow (xdisp, scrollBar.win); + XClearWindow (dpy, scrollBar.win); /* scrollbar slider */ - XFillRectangle (xdisp, scrollBar.win, pscrollbarGC, + XFillRectangle (dpy, scrollBar.win, pscrollbarGC, 1 - xsb, scrollBar.top, sbwidth, scrollbar_len); return 1; diff --git a/src/scrollbar-rxvt.C b/src/scrollbar-rxvt.C index 2bf6935d..a2e44f3f 100644 --- a/src/scrollbar-rxvt.C +++ b/src/scrollbar-rxvt.C @@ -38,10 +38,10 @@ draw_shadow (rxvt_term *term, int x, int y, int w, int h) for (; shadow-- > 0; x++, y++, w--, 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 ); + XDrawLine (term->dpy, term->scrollBar.win, term->topShadowGC, x, y, w , y ); + XDrawLine (term->dpy, term->scrollBar.win, term->topShadowGC, x, y, x , h ); + XDrawLine (term->dpy, term->scrollBar.win, term->botShadowGC, w, h, w , y + 1); + XDrawLine (term->dpy, 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->xdisp, term->scrollBar.win, term->scrollbarGC, + XFillPolygon (term->dpy, term->scrollBar.win, term->scrollbarGC, pt, 3, Convex, CoordModeOrigin); /* draw base */ - XDrawLine (term->xdisp, term->scrollBar.win, (dirn == UP ? bot : top), + XDrawLine (term->dpy, 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->xdisp, term->scrollBar.win, top, + XDrawLine (term->dpy, 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->xdisp, term->scrollBar.win, top, + XDrawLine (term->dpy, 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->xdisp, term->scrollBar.win, bot, + XDrawLine (term->dpy, 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->xdisp, term->scrollBar.win, bot, + XDrawLine (term->dpy, 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 (xdisp, scrollBar.win, pix_colors_focused[Color_trough]); - XClearWindow (xdisp, scrollBar.win); + XSetWindowBackground (dpy, scrollBar.win, pix_colors_focused[Color_trough]); + XClearWindow (dpy, 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 (xdisp, scrollBar.win, + XClearArea (dpy, scrollBar.win, sbshadow, last_top, sbwidth, (scrollBar.top - last_top), False); if (scrollBar.bot < last_bot) - XClearArea (xdisp, scrollBar.win, + XClearArea (dpy, scrollBar.win, sbshadow, scrollBar.bot, sbwidth, (last_bot - scrollBar.bot), False); } else - XClearWindow (xdisp, scrollBar.win); + XClearWindow (dpy, 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 (xdisp, scrollBar.win, botShadowGC, + XDrawLine (dpy, scrollBar.win, botShadowGC, xofs, 0, xofs, scrollBar.end + sbwidth); } #endif - XFillRectangle (xdisp, scrollBar.win, scrollbarGC, + XFillRectangle (dpy, scrollBar.win, scrollbarGC, sbshadow, scrollBar.top, sbwidth, scrollbar_len); diff --git a/src/scrollbar-xterm.C b/src/scrollbar-xterm.C index 4ccad2a5..46f0ab27 100644 --- 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 (xdisp, scrollBar.win, + gcvalue.stipple = XCreateBitmapFromData (dpy, 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 (xdisp, scrollBar.win, + xscrollbarGC = XCreateGC (dpy, scrollBar.win, GCForeground | GCBackground | GCFillStyle | GCStipple, &gcvalue); gcvalue.foreground = pix_colors_focused[Color_border]; - ShadowGC = XCreateGC (xdisp, scrollBar.win, GCForeground, &gcvalue); + ShadowGC = XCreateGC (dpy, scrollBar.win, GCForeground, &gcvalue); } if (update) { xsb = OPTION (Opt_scrollBar_right) ? 1 : 0; if (last_top < scrollBar.top) - XClearArea (xdisp, scrollBar.win, + XClearArea (dpy, scrollBar.win, sb_shadow + xsb, last_top, sbwidth, (scrollBar.top - last_top), False); if (scrollBar.bot < last_bot) - XClearArea (xdisp, scrollBar.win, + XClearArea (dpy, scrollBar.win, sb_shadow + xsb, scrollBar.bot, sbwidth, (last_bot - scrollBar.bot), False); } else - XClearWindow (xdisp, scrollBar.win); + XClearWindow (dpy, scrollBar.win); /* scrollbar slider */ - XFillRectangle (xdisp, scrollBar.win, xscrollbarGC, + XFillRectangle (dpy, scrollBar.win, xscrollbarGC, xsb + 1, scrollBar.top, sbwidth - 2, scrollbar_len); - XDrawLine (xdisp, scrollBar.win, ShadowGC, + XDrawLine (dpy, 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 index bb426366..3876f9f9 100644 --- a/src/scrollbar.C +++ b/src/scrollbar.C @@ -46,14 +46,14 @@ rxvt_term::scrollbar_mapping (int map) if (scrollBar.win) { - XMapWindow (xdisp, scrollBar.win); + XMapWindow (dpy, scrollBar.win); change = 1; } } else { scrollBar.state = 0; - XUnmapWindow (xdisp, scrollBar.win); + XUnmapWindow (dpy, scrollBar.win); change = 1; } #endif @@ -112,7 +112,7 @@ rxvt_term::resize_scrollbar () if (!scrollBar.win) { /* create the scrollbar window */ - scrollBar.win = XCreateSimpleWindow (xdisp, + scrollBar.win = XCreateSimpleWindow (dpy, parent[0], window_sb_x, 0, scrollbar_TotalWidth (), @@ -120,9 +120,9 @@ rxvt_term::resize_scrollbar () 0, pix_colors[Color_fg], pix_colors[Color_border]); - XDefineCursor (xdisp, scrollBar.win, leftptr_cursor); + XDefineCursor (dpy, scrollBar.win, leftptr_cursor); - XSelectInput (xdisp, scrollBar.win, + XSelectInput (dpy, scrollBar.win, ExposureMask | ButtonPressMask | ButtonReleaseMask | Button1MotionMask | Button2MotionMask | Button3MotionMask); @@ -134,7 +134,7 @@ rxvt_term::resize_scrollbar () scrollbar_show (1); if (delayed_init) - XMapWindow (xdisp, scrollBar.win); + XMapWindow (dpy, scrollBar.win); #endif } diff --git a/src/xdefaults.C b/src/xdefaults.C index 0e5c5427..3f4b6c92 100644 --- a/src/xdefaults.C +++ b/src/xdefaults.C @@ -776,7 +776,7 @@ get_res (XrmDatabase database, const char *program, const char *option) const char * rxvt_term::x_resource (const char *name) { - XrmDatabase database = XrmGetDatabase (xdisp); + XrmDatabase database = XrmGetDatabase (dpy); const char *p = get_res (database, rs[Rs_name], name); const char *p0 = get_res (database, "!INVALIDPROGRAMMENAMEDONTMATCH!", name); @@ -838,7 +838,7 @@ rxvt_term::extract_resources () * [R5 or later]: enumerate the resource database */ # ifdef KEYSYM_RESOURCE - XrmDatabase database = XrmGetDatabase (xdisp); + XrmDatabase database = XrmGetDatabase (dpy); XrmName name_prefix[3]; XrmClass class_prefix[3]; diff --git a/src/xpm.C b/src/xpm.C index 02466624..4366467c 100644 --- a/src/xpm.C +++ b/src/xpm.C @@ -170,20 +170,20 @@ rxvt_term::resize_pixmap () GC gc; if (pixmap != None) - XFreePixmap (xdisp, pixmap); + XFreePixmap (dpy, pixmap); if (bgPixmap.pixmap == None) { /* So be it: I'm not using pixmaps */ pixmap = None; if (!OPTION (Opt_transparent) || !am_transparent) - XSetWindowBackground (xdisp, vt, pix_colors[Color_bg]); + XSetWindowBackground (dpy, vt, pix_colors[Color_bg]); return; } gcvalue.foreground = pix_colors[Color_bg]; - gc = XCreateGC (xdisp, vt, GCForeground, &gcvalue); + gc = XCreateGC (dpy, vt, GCForeground, &gcvalue); if (bgPixmap.pixmap != None) { /* we have a specified pixmap */ @@ -204,26 +204,26 @@ rxvt_term::resize_pixmap () if (!w) { /* basic X tiling - let the X server do it */ - pixmap = XCreatePixmap (xdisp, vt, xpmw, xpmh, depth); + pixmap = XCreatePixmap (dpy, vt, xpmw, xpmh, depth); - XCopyArea (xdisp, bgPixmap.pixmap, pixmap, gc, x, y, xpmw - x, xpmh - y, 0, 0); - XCopyArea (xdisp, bgPixmap.pixmap, pixmap, gc, x, 0, xpmw - x, y, 0, xpmh - y); - XCopyArea (xdisp, bgPixmap.pixmap, pixmap, gc, 0, y, x, xpmh - y, xpmw - x, 0); - XCopyArea (xdisp, bgPixmap.pixmap, pixmap, gc, 0, 0, x, y, xpmw - x, xpmh - y); + XCopyArea (dpy, bgPixmap.pixmap, pixmap, gc, x, y, xpmw - x, xpmh - y, 0, 0); + XCopyArea (dpy, bgPixmap.pixmap, pixmap, gc, x, 0, xpmw - x, y, 0, xpmh - y); + XCopyArea (dpy, bgPixmap.pixmap, pixmap, gc, 0, y, x, xpmh - y, xpmw - x, 0); + XCopyArea (dpy, bgPixmap.pixmap, pixmap, gc, 0, 0, x, y, xpmw - x, xpmh - y); } else { float incr, p; Pixmap tmp; - pixmap = XCreatePixmap (xdisp, vt, width, height, depth); + pixmap = XCreatePixmap (dpy, vt, width, height, depth); /* * horizontal scaling */ rxvt_pixmap_incr (&w, &x, &incr, &p, width, xpmw); - tmp = XCreatePixmap (xdisp, vt, width, xpmh, depth); - XFillRectangle (xdisp, tmp, gc, 0, 0, width, xpmh); + tmp = XCreatePixmap (dpy, vt, width, xpmh, depth); + XFillRectangle (dpy, tmp, gc, 0, 0, width, xpmh); for ( /*nil */ ; x < w; x++, p += incr) { @@ -231,7 +231,7 @@ rxvt_term::resize_pixmap () p = 0; /* copy one column from the original pixmap to the tmp pixmap */ - XCopyArea (xdisp, bgPixmap.pixmap, tmp, gc, (int)p, 0, 1, xpmh, (int)x, 0); + XCopyArea (dpy, bgPixmap.pixmap, tmp, gc, (int)p, 0, 1, xpmh, (int)x, 0); } /* @@ -240,10 +240,10 @@ rxvt_term::resize_pixmap () rxvt_pixmap_incr (&h, &y, &incr, &p, height, xpmh); if (y > 0) - XFillRectangle (xdisp, pixmap, gc, 0, 0, width, y); + XFillRectangle (dpy, pixmap, gc, 0, 0, width, y); if (h < height) - XFillRectangle (xdisp, pixmap, gc, 0, (int)h, width, height - h + 1); + XFillRectangle (dpy, pixmap, gc, 0, (int)h, width, height - h + 1); for ( /*nil */ ; y < h; y++, p += incr) { @@ -251,22 +251,22 @@ rxvt_term::resize_pixmap () p = 0; /* copy one row from the tmp pixmap to the main pixmap */ - XCopyArea (xdisp, tmp, pixmap, gc, 0, (int)p, width, 1, 0, (int)y); + XCopyArea (dpy, tmp, pixmap, gc, 0, (int)p, width, 1, 0, (int)y); } - XFreePixmap (xdisp, tmp); + XFreePixmap (dpy, tmp); } } - XSetWindowBackgroundPixmap (xdisp, vt, pixmap); + XSetWindowBackgroundPixmap (dpy, vt, pixmap); if (pixmap != None) { - XFreePixmap (xdisp, pixmap); + XFreePixmap (dpy, pixmap); pixmap = None; } - XFreeGC (xdisp, gc); + XFreeGC (dpy, gc); am_transparent = 0; } @@ -355,11 +355,11 @@ rxvt_term::set_bgPixmap (const char *file) if (bgPixmap.pixmap != None) { - XFreePixmap (xdisp, bgPixmap.pixmap); + XFreePixmap (dpy, bgPixmap.pixmap); bgPixmap.pixmap = None; } - XSetWindowBackground (xdisp, vt, pix_colors[Color_bg]); + XSetWindowBackground (dpy, 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 (xdisp, vt, &attr); */ + /* XGetWindowAttributes (dpy, 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 (xdisp, display->root, f, + || XpmReadFileToPixmap (dpy, display->root, f, &bgPixmap.pixmap, NULL, &xpmAttr)) {