Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Clear X window in tsetreset()
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
f7fecf8
..
4c8d67f
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-201,7
+201,7
@@
typedef struct {
XftDraw *xft_draw;
Visual *vis;
int scr;
XftDraw *xft_draw;
Visual *vis;
int scr;
-
B
ool isfixed; /* is fixed geometry? */
+
b
ool isfixed; /* is fixed geometry? */
int fx, fy, fw, fh; /* fixed geometry */
int tw, th; /* tty width and height */
int w; /* window width */
int fx, fy, fw, fh; /* fixed geometry */
int tw, th; /* tty width and height */
int w; /* window width */
@@
-940,7
+940,7
@@
tcursor(int mode) {
void
treset(void) {
void
treset(void) {
- u
nsigned
i;
+ u
int
i;
term.c = (TCursor){{
.mode = ATTR_NULL,
.fg = DefaultFG,
term.c = (TCursor){{
.mode = ATTR_NULL,
.fg = DefaultFG,
@@
-952,6
+952,7
@@
treset(void) {
term.tabs[i] = 1;
term.top = 0, term.bot = term.row - 1;
term.mode = MODE_WRAP;
term.tabs[i] = 1;
term.top = 0, term.bot = term.row - 1;
term.mode = MODE_WRAP;
+ xclear(0, 0, xw.w, xw.h);
tclearregion(0, 0, term.col-1, term.row-1);
}
tclearregion(0, 0, term.col-1, term.row-1);
}
@@
-1603,7
+1604,7
@@
strreset(void) {
void
tputtab(bool forward) {
void
tputtab(bool forward) {
- u
nsigned
x = term.c.x;
+ u
int
x = term.c.x;
if(forward) {
if(x == term.col)
if(forward) {
if(x == term.col)
@@
-2381,7
+2382,7
@@
run(void) {
int
main(int argc, char *argv[]) {
int i, bitm, xr, yr;
int
main(int argc, char *argv[]) {
int i, bitm, xr, yr;
- u
nsigned
int wr, hr;
+ uint wr, hr;
xw.fw = xw.fh = xw.fx = xw.fy = 0;
xw.isfixed = False;
xw.fw = xw.fh = xw.fx = xw.fy = 0;
xw.isfixed = False;
@@
-2433,9
+2434,9
@@
main(int argc, char *argv[]) {
run:
setlocale(LC_CTYPE, "");
run:
setlocale(LC_CTYPE, "");
+ xinit();
tnew(80, 24);
ttynew();
tnew(80, 24);
ttynew();
- xinit();
selinit();
run();
return 0;
selinit();
run();
return 0;