Move win-agnostic parts of draw/drawregion to st.c

Introduces three functions to encapsulate X-specific behavior:
 * xdrawline: draws a portion of a single line (used by drawregion)
 * xbegindraw: called to prepare for drawing (will be useful for e.g.
   Wayland) and returns true if drawing should happen
 * xfinishdraw: called to finish drawing (used by draw)

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
This commit is contained in:
Devin J. Pohly
2018-02-24 14:53:23 -06:00
parent 05c66cb37d
commit 88d8293fb4
4 changed files with 69 additions and 51 deletions

1
st.h
View File

@ -131,6 +131,7 @@ typedef union {
void die(const char *, ...);
void redraw(void);
void draw(void);
void iso14755(const Arg *);
void printscreen(const Arg *);