aboutsummarylogtreecommitdiffstats
path: root/x.c
diff options
context:
space:
mode:
authorDevin J. Pohly2018-02-24 16:32:20 -0600
committerDevin J. Pohly2018-02-25 21:56:26 -0600
commit389f447cf42be5105c99fff3f08c6450a2dd6e5d (patch)
tree94fbb1c212040b5a5b10e99545b0ff3ae2a502c0 /x.c
parentda33531ed1b5a7a28f192b0b9d8f58aea3187b64 (diff)
downloadaur-389f447cf42be5105c99fff3f08c6450a2dd6e5d.tar.gz
Reduce visibility wherever possible
When possible, declare functions/variables static and move struct definitions out of headers. In order to allow utf8decode to become internal, use codepoint for DECSCUSR extension directly. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'x.c')
-rw-r--r--x.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/x.c b/x.c
index 970d6dd88167..f7b05285508d 100644
--- a/x.c
+++ b/x.c
@@ -76,6 +76,15 @@ typedef XftGlyphFontSpec GlyphFontSpec;
/* Purely graphic info */
typedef struct {
+ int tw, th; /* tty width and height */
+ int w, h; /* window width and height */
+ int ch; /* char height */
+ int cw; /* char width */
+ int mode; /* window state/mode flags */
+ int cursor; /* cursor style */
+} TermWindow;
+
+typedef struct {
Display *dpy;
Colormap cmap;
Window win;
@@ -133,6 +142,8 @@ static int xgeommasktogravity(int);
static void xinit(int, int);
static void cresize(int, int);
static void xresize(int, int);
+static void xhints(void);
+static int xloadcolor(int, const char *, Color *);
static int xloadfont(Font *, FcPattern *);
static void xloadfonts(char *, double);
static void xunloadfont(Font *);
@@ -1430,8 +1441,8 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
/* draw the new one */
if (IS_SET(MODE_FOCUSED)) {
switch (win.cursor) {
- case 7: /* st extension: snowman */
- utf8decode("☃", &g.u, UTF_SIZ);
+ case 7: /* st extension: snowman (U+2603) */
+ g.u = 0x2603;
case 0: /* Blinking Block */
case 1: /* Blinking Block (Default) */
case 2: /* Steady Block */