changeset: 119:d6b78f5c83e1
tag: tip
user: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
date: Tue Aug 31 14:52:52 2010 +0200
files: st.c
description:
use GLYPH_SET to test if a char is set; cleanup.
diff -r 73d658f4ca2b -r d6b78f5c83e1 st.c
--- a/st.c Tue Aug 31 11:40:57 2010 +0200
+++ b/st.c Tue Aug 31 14:52:52 2010 +0200
@@ -245,7 +245,7 @@
ptr = str = malloc (sz);
for(y = 0; y < term.row; y++) {
for(x = 0; x < term.col; x++) {
- if(term.line[y][x].c && (ls=selected(x, y))) {
+ if(term.line[y][x].state & GLYPH_SET && (ls=selected(x, y))) {
*ptr = term.line[y][x].c;
ptr++;
}
@@ -1421,11 +1421,9 @@
row = xw.bufh / xw.ch;
tresize(col, row);
ttyresize(col, row);
+ xw.bufh = MAX(1, xw.bufh);
+ xw.bufw = MAX(1, xw.bufw);
XFreePixmap(xw.dis, xw.buf);
- if(xw.bufh<1)
- xw.bufh = 1;
- if(xw.bufw<1)
- xw.bufw = 1;
xw.buf = XCreatePixmap(xw.dis, xw.win, xw.bufw, xw.bufh, XDefaultDepth(xw.dis, xw.scr));
draw(SCREEN_REDRAW);
}
@@ -1435,7 +1433,9 @@
XEvent ev;
fd_set rfd;
int xfd = XConnectionNumber(xw.dis);
- long mask = ExposureMask | KeyPressMask | StructureNotifyMask | FocusChangeMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask;
+ long mask = ExposureMask | KeyPressMask | StructureNotifyMask
+ | FocusChangeMask | PointerMotionMask | ButtonPressMask
+ | ButtonReleaseMask;
XSelectInput(xw.dis, xw.win, mask);
XResizeWindow(xw.dis, xw.win, xw.w, xw.h); /* XXX: fix resize bug in wmii (?) */
Received on Tue Aug 31 2010 - 14:53:08 CEST
This archive was generated by hypermail 2.2.0 : Tue Aug 31 2010 - 15:00:07 CEST